een-api-toolkit 0.3.60 → 0.3.67

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 (40) hide show
  1. package/.claude/agents/docs-accuracy-reviewer.md +17 -4
  2. package/.claude/agents/een-auth-agent.md +1 -1
  3. package/.claude/agents/een-devices-agent.md +1 -1
  4. package/.claude/agents/een-media-agent.md +7 -5
  5. package/.claude/agents/een-users-agent.md +5 -5
  6. package/.claude/agents/test-runner.md +8 -6
  7. package/CHANGELOG.md +119 -9
  8. package/dist/index.cjs +2 -2
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.ts +68 -0
  11. package/dist/index.js +127 -118
  12. package/dist/index.js.map +1 -1
  13. package/docs/AI-CONTEXT.md +1 -1
  14. package/docs/ai-reference/AI-AUTH.md +1 -1
  15. package/docs/ai-reference/AI-AUTOMATIONS.md +1 -1
  16. package/docs/ai-reference/AI-DEVICES.md +1 -1
  17. package/docs/ai-reference/AI-EVENT-DATA-SCHEMAS.md +76 -74
  18. package/docs/ai-reference/AI-EVENTS.md +2 -1
  19. package/docs/ai-reference/AI-GROUPING.md +1 -1
  20. package/docs/ai-reference/AI-JOBS.md +1 -1
  21. package/docs/ai-reference/AI-MEDIA.md +1 -1
  22. package/docs/ai-reference/AI-SETUP.md +1 -1
  23. package/docs/ai-reference/AI-USERS.md +1 -1
  24. package/examples/vue-alerts-metrics/README.md +10 -0
  25. package/examples/vue-automations/README.md +4 -0
  26. package/examples/vue-bridges/README.md +6 -0
  27. package/examples/vue-cameras/README.md +7 -0
  28. package/examples/vue-event-subscriptions/README.md +10 -0
  29. package/examples/vue-events/README.md +12 -0
  30. package/examples/vue-events/src/components/EventsModal.vue +1 -0
  31. package/examples/vue-feeds/README.md +5 -0
  32. package/examples/vue-feeds/src/App.vue +5 -4
  33. package/examples/vue-feeds/src/views/Home.vue +3 -1
  34. package/examples/vue-jobs/README.md +7 -0
  35. package/examples/vue-layouts/README.md +3 -1
  36. package/examples/vue-media/README.md +5 -0
  37. package/examples/vue-users/README.md +3 -0
  38. package/examples/vue-users/package-lock.json +2 -2
  39. package/examples/vue-users/package.json +1 -1
  40. package/package.json +2 -1
@@ -2,7 +2,7 @@
2
2
  name: docs-accuracy-reviewer
3
3
  description: |
4
4
  Use this agent when you need to verify that project documentation accurately reflects the actual codebase, when checking for broken links in markdown files, when validating configuration examples in documentation, or when ensuring README and other docs are up-to-date with implemented features. This agent reads documentation and compares it against source code but does not modify code files.
5
- model: inherit
5
+ model: sonnet
6
6
  color: purple
7
7
  ---
8
8
 
@@ -70,6 +70,7 @@ assistant: "I'll use the docs-accuracy-reviewer agent to verify the een-* agent
70
70
  - List all markdown files in the project (README.md, docs/**, CLAUDE.md, etc.)
71
71
  - **Scan ALL example directories** (`examples/*/README.md`) - do not skip any
72
72
  - **Check ALL agent files** in `.claude/agents/een-*.md` - verify function signatures and code examples against actual implementations
73
+ - **Check ALL skill files** in `.claude/skills/*/SKILL.md` - verify referenced scripts, npm commands, and workflows match actual implementations
73
74
  - Identify the source code structure for cross-referencing (especially `src/index.ts` exports, `src/*/service.ts` implementations, and `src/types/*.ts` definitions)
74
75
 
75
76
  2. **Analysis Phase**:
@@ -122,6 +123,17 @@ assistant: "I'll use the docs-accuracy-reviewer agent to verify the een-* agent
122
123
  - Verify .env.example matches documentation
123
124
  - Check that all required secrets are documented
124
125
 
126
+ ### For Skills (`.claude/skills/*/SKILL.md`):
127
+ - **Script References**: Verify all referenced scripts exist in `scripts/` and are executable
128
+ - **npm Commands**: Verify all `npm run` commands exist in `package.json` scripts
129
+ - **Workflow Steps**: Verify described workflows match actual tool capabilities and script behavior
130
+ - **File Paths**: Verify all referenced file paths and directories exist
131
+ - Cross-reference the PR-and-check skill's test commands against actual `package.json` scripts
132
+
133
+ ### For Test Runner Agent (`.claude/agents/test-runner.md`):
134
+ - Verify documented test commands match `package.json` scripts (e.g., `npm run test:e2e:examples` for example app E2E tests)
135
+ - Verify the E2E test execution approach matches the actual `scripts/run-examples-e2e.sh` behavior
136
+
125
137
  ### For Claude Agent Files (`.claude/agents/een-*.md`):
126
138
  - **Function Signatures**: Verify all documented function signatures match actual implementations in `src/*/service.ts`
127
139
  - **Parameter Names**: Check that parameter names in examples match the actual API (e.g., `deviceId` not `cameraId`, `userId` as direct param not `{ id: userId }`)
@@ -176,9 +188,10 @@ Before completing your review:
176
188
  1. Verify you've checked ALL markdown files in the project
177
189
  2. **Confirm ALL example app READMEs were reviewed** (list them in your report)
178
190
  3. **Confirm ALL `.claude/agents/een-*.md` files were reviewed** for API accuracy
179
- 4. Confirm each fix you made is backed by evidence from source code
180
- 5. Re-read modified sections to ensure they're clear and accurate
181
- 6. Check that your fixes didn't introduce new broken links or inconsistencies
191
+ 4. **Confirm ALL `.claude/skills/*/SKILL.md` files were reviewed** for script and npm command accuracy
192
+ 5. Confirm each fix you made is backed by evidence from source code
193
+ 6. Re-read modified sections to ensure they're clear and accurate
194
+ 7. Check that your fixes didn't introduce new broken links or inconsistencies
182
195
 
183
196
  ## Common Agent File Issues to Watch For
184
197
 
@@ -119,7 +119,7 @@ const authStore = useAuthStore()
119
119
  authStore.token // Current access token
120
120
  authStore.baseUrl // EEN API base URL (region-specific)
121
121
  authStore.isAuthenticated // Computed: true if valid token exists
122
- authStore.isExpired // Computed: true if token expired
122
+ authStore.isTokenExpired // Computed: true if token expired
123
123
  ```
124
124
 
125
125
  ### authStore.initialize() - Session Restoration (CRITICAL)
@@ -141,7 +141,7 @@ interface ListCamerasParams {
141
141
  status__ne?: CameraStatus // Exclude this status
142
142
  tags__contains?: string[] // Must have ALL these tags
143
143
  tags__any?: string[] // Must have ANY of these tags
144
- bridgeId__eq?: string // Cameras on specific bridge
144
+ bridgeId__in?: string[] // Cameras on specific bridge(s)
145
145
  q?: string // Full-text search
146
146
  }
147
147
  ```
@@ -164,8 +164,8 @@ import { getRecordedImage, formatTimestamp } from 'een-api-toolkit'
164
164
  async function fetchRecordedFrame(deviceId: string, date: Date) {
165
165
  const result = await getRecordedImage({
166
166
  deviceId,
167
- timestamp: formatTimestamp(date.toISOString()), // MUST use formatTimestamp()
168
- type: 'preview' // Optional, defaults to 'preview'
167
+ timestamp__gte: formatTimestamp(date.toISOString()), // MUST use formatTimestamp()
168
+ type: 'preview' // Optional
169
169
  })
170
170
 
171
171
  if (result.data) {
@@ -179,12 +179,14 @@ List recorded media intervals:
179
179
  ```typescript
180
180
  import { listMedia, formatTimestamp, type ListMediaParams } from 'een-api-toolkit'
181
181
 
182
- async function fetchRecordings(cameraId: string, startDate: Date, endDate: Date) {
182
+ async function fetchRecordings(deviceId: string, startDate: Date, endDate: Date) {
183
183
  const result = await listMedia({
184
- cameraId,
184
+ deviceId,
185
+ type: 'preview', // Stream type: 'preview' or 'main'
186
+ mediaType: 'video', // Content type: 'video' or 'image'
185
187
  startTimestamp: formatTimestamp(startDate),
186
188
  endTimestamp: formatTimestamp(endDate),
187
- type: 'video'
189
+ include: ['hlsUrl'] // Request HLS URLs for playback
188
190
  })
189
191
 
190
192
  if (result.data) {
@@ -54,8 +54,8 @@ assistant: "I'll use the een-users-agent to diagnose the user lookup issue and i
54
54
  ```typescript
55
55
  interface User {
56
56
  id: string
57
- firstName?: string
58
- lastName?: string
57
+ firstName: string
58
+ lastName: string
59
59
  email: string
60
60
  isActive?: boolean
61
61
  permissions?: string[]
@@ -71,9 +71,9 @@ interface UserProfile {
71
71
  firstName: string
72
72
  lastName: string
73
73
  email: string
74
- accountId: string
75
- permissions: string[]
76
- // ... profile-specific fields
74
+ accountId?: string
75
+ timeZone?: string
76
+ language?: string
77
77
  }
78
78
  ```
79
79
 
@@ -2,7 +2,7 @@
2
2
  name: test-runner
3
3
  description: |
4
4
  Use this agent when you need to run the complete test suite for the project, including unit tests (Vitest) and E2E tests (Playwright). This agent is ideal after writing a logical chunk of code, before creating a PR, or when you want to verify the overall health of the codebase. The agent executes tests and reports results but does not modify any code.
5
- model: inherit
5
+ model: sonnet
6
6
  color: green
7
7
  ---
8
8
 
@@ -69,14 +69,16 @@ Capture and analyze:
69
69
  - Test file locations for failures
70
70
 
71
71
  ### Step 3: Execute E2E Tests
72
- Run the Playwright E2E test suite:
72
+ Run the Playwright E2E tests for all example apps:
73
73
  ```bash
74
- npm run test:e2e
74
+ npm run test:e2e:examples
75
75
  ```
76
+ This script (`scripts/run-examples-e2e.sh`) discovers all example apps with `playwright.config.ts`, frees port 3333 between runs, and stops on first failure.
77
+
76
78
  Capture and analyze:
77
- - Browser contexts tested
78
- - Total E2E scenarios run
79
- - Passed/failed counts
79
+ - Which example apps passed/failed
80
+ - Total E2E scenarios run across all apps
81
+ - Passed/failed counts per app
80
82
  - Screenshots or traces for failures (if available)
81
83
  - Timeout or network-related issues
82
84
 
package/CHANGELOG.md CHANGED
@@ -2,28 +2,138 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [0.3.60] - 2026-02-06
5
+ ## [0.3.67] - 2026-02-08
6
6
 
7
7
  ### Release Summary
8
8
 
9
- No PR descriptions available for this release.
9
+ #### PR #91: feat: E2E runner script, release summary fix, agent updates
10
+ ## Summary
11
+
12
+ - **feat:** Add `scripts/run-examples-e2e.sh` that dynamically discovers all example apps and runs Playwright E2E tests sequentially with port 3333 cleanup between runs
13
+ - **fix:** Fix npm-publish workflow race condition where Release Summary was always empty — replaced `git log --merges` (which failed when checked-out develop commit didn't have production merge commits as ancestors) with `gh pr list --base production --state merged` via GitHub API
14
+ - **fix:** Update PR-and-check skill to fetch all tags (`git fetch origin --tags`), check for in-progress release workflows before proceeding, use `npm run test:e2e:examples` script, and set 20-minute E2E timeout
15
+ - **chore:** Update docs-accuracy-reviewer to also verify skills and agent files against actual implementations
16
+ - **chore:** Set sonnet model for test-runner and docs-accuracy-reviewer agents
17
+ - **fix:** Correct inaccuracies in een-auth, een-devices, een-media, een-users agent files
18
+
19
+ ## Version
20
+
21
+ `0.3.62`
22
+
23
+ ## Commits
24
+
25
+ - `6df59c8` chore: Set 20-minute timeout for example E2E tests in PR skill
26
+ - `fce1f9e` feat: Add E2E runner script, fix release PR summaries, update agents
27
+
28
+ ## Test Results
29
+
30
+ | Check | Result |
31
+ |-------|--------|
32
+ | Lint | Passed |
33
+ | Unit Tests | 600 passed (22 files) |
34
+ | Build | Passed |
35
+ | vue-alerts-metrics E2E | 20 passed |
36
+ | vue-automations E2E | 24 passed |
37
+ | vue-bridges E2E | 18 passed |
38
+ | vue-cameras E2E | 41 passed |
39
+ | vue-event-subscriptions E2E | 15 passed |
40
+ | vue-events E2E | 16 passed |
41
+ | vue-feeds E2E | 12 passed |
42
+ | vue-jobs E2E | 34 passed |
43
+ | vue-layouts E2E | 14 passed |
44
+ | vue-media E2E | 20 passed |
45
+ | vue-users E2E | 14 passed (passed on retry, transient OAuth callback timeout) |
46
+ | **Total E2E** | **228 passed across 11 apps** |
47
+
48
+ ## Security Review
49
+
50
+ No security concerns. Changes are limited to:
51
+ - Shell script for test orchestration (no user input, runs locally)
52
+ - GitHub Actions workflow fix (uses `gh` CLI with existing `GH_TOKEN`)
53
+ - Documentation/agent file corrections (markdown only)
54
+ - No new dependencies, no API changes, no auth flow changes
55
+
56
+ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
57
+
58
+ #### PR #92: Release v0.3.66 - GitHub Issues Resolution & vue-feeds Fix
59
+ ## Release v0.3.66
60
+
61
+ This PR merges develop into production with GitHub issue resolutions, automation improvements, and critical bug fixes.
62
+
63
+ ### Summary
64
+
65
+ - Resolved all 7 open GitHub issues
66
+ - Automated event data schemas documentation generation
67
+ - Fixed vue-feeds navigation reactivity issue
68
+ - Added camera utility functions
69
+ - Improved accessibility with aria-labels
70
+
71
+ ### Changes
72
+
73
+ **Closed Issues:**
74
+ - ✅ #84 - Added aria-label to JSON viewer button for screen reader accessibility
75
+ - ✅ #70 - Implemented getCameraStatusString() utility function
76
+ - ✅ #71 - Implemented isStatusObject() TypeScript type guard
77
+ - ✅ #87 - Documented auto-generated vs manually maintained files
78
+ - ✅ #89 - Fully automated event data schemas documentation generation
79
+ - ❌ #85 - Closed as won't-do (JSON viewer E2E tests)
80
+ - ❌ #76 - Closed as won't-do (datetime persistence test timezone)
81
+
82
+ **New Features:**
83
+ - `src/utils/camera.ts` - Camera status utility functions with full JSDoc
84
+ - `scripts/generate-event-data-schemas-doc.ts` - Auto-generates AI-EVENT-DATA-SCHEMAS.md from TypeScript source
85
+ - CLAUDE.md documentation section explaining auto-generated vs manual files
86
+
87
+ **Bug Fixes:**
88
+ - Fixed vue-feeds navigation not appearing after OAuth login (computed property for reactivity)
89
+ - Updated all example app READMEs with accurate function lists
90
+
91
+ ### Test Results
92
+
93
+ **✅ Passed (8 of 11 apps - 148 tests):**
94
+ - vue-alerts-metrics: 20 tests
95
+ - vue-automations: 24 tests
96
+ - vue-bridges: 13 tests
97
+ - vue-event-subscriptions: 15 tests
98
+ - vue-events: 16 tests
99
+ - **vue-feeds: 12 tests** ✅ (Main fix verified)
100
+ - vue-jobs: 34 tests
101
+ - vue-users: 14 tests
102
+
103
+ **Note:** 3 apps failed due to OAuth rate limiting (vue-cameras) and test config issues (vue-layouts, vue-media) - not related to code changes.
104
+
105
+ ### Security Review
106
+
107
+ ✅ Security review completed - No vulnerabilities found
108
+ - All file operations use safe path handling
109
+ - No command injection risks
110
+ - Regex patterns safe from ReDoS
111
+ - Vue components follow framework security best practices
112
+
113
+ ### Version
114
+
115
+ v0.3.66 (auto-incremented from 0.3.64 via Husky pre-commit hooks)
116
+
117
+ ---
118
+
119
+ Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
120
+
10
121
 
11
122
  ### Detailed Changes
12
123
 
13
124
  #### Features
14
- - feat: Add getCameraSettings API, simplify camera list, add Google Maps link
125
+ - feat: Resolve all open GitHub issues with automation and utilities
15
126
 
16
127
  #### Bug Fixes
17
- - fix: Use as const for settingsIncludes and fix vue-media Now button E2E test
128
+ - fix: Add computed property for auth reactivity in vue-feeds example
18
129
 
19
130
  #### Other Changes
20
- - test: Add E2E coverage tests and update PR skill for sequential E2E runs
21
- - docs: Update vue-cameras home page to reflect current features
22
- - chore: Resize vue-cameras screenshot to 1200px width
131
+ - docs: Address code review feedback for camera utilities
132
+ - docs: Update example app READMEs to accurately list all toolkit functions used
23
133
 
24
134
  ### Links
25
135
  - [npm package](https://www.npmjs.com/package/een-api-toolkit)
26
- - [Full Changelog](https://github.com/klaushofrichter/een-api-toolkit/compare/v0.3.55...v0.3.60)
136
+ - [Full Changelog](https://github.com/klaushofrichter/een-api-toolkit/compare/v0.3.63...v0.3.67)
27
137
 
28
138
  ---
29
- *Released: 2026-02-06 21:17:36 CST*
139
+ *Released: 2026-02-08 17:32:38 CST*