@hasna/uptime 0.1.3 → 0.1.4

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 CHANGED
@@ -6,6 +6,32 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.4] - 2026-06-28
10
+
11
+ ### Added
12
+
13
+ - Local scheduled uptime reports with persisted schedules, run history, and due
14
+ execution through Mailery email, Telephony SMS, and Open Logs.
15
+ - CLI commands under `uptime report-schedules` plus `uptime audit`.
16
+ - Local API and MCP surfaces for report schedules, report runs, and audit
17
+ events.
18
+ - Immutable local audit events for report schedule create/update/delete/run
19
+ actions.
20
+
21
+ ### Changed
22
+
23
+ - Bumped the local SQLite schema to version 3 while keeping schema version 1
24
+ and 2 backups restorable when they only lack newer probe/report/audit tables.
25
+ - Hosted report schedule routes fail closed until cloud channel refs, workspace
26
+ stores, and audit logging are implemented.
27
+
28
+ ### Security
29
+
30
+ - Persisted report schedules reject inline API keys and tokens; scheduled runs
31
+ resolve Mailery/Open Logs credentials from environment variables or future
32
+ cloud channel refs.
33
+ - Audit metadata redacts token/key/secret-like fields before persistence.
34
+
9
35
  ## [0.1.3] - 2026-06-28
10
36
 
11
37
  ### Added
package/README.md CHANGED
@@ -27,10 +27,18 @@ uptime summary
27
27
  uptime report --dry-run
28
28
  uptime report --email ops@example.com --from alerts@example.com --send-key "$MAILERY_SEND_KEY"
29
29
  uptime report --sms +15550000001 --logs
30
+ uptime report-schedules create ops --interval 3600 --email ops@example.com --from alerts@example.com
31
+ uptime report-schedules run-due
32
+ uptime report-schedules runs
33
+ uptime audit
30
34
  uptime incidents
31
35
  uptime serve --port 3899 --check
32
36
  ```
33
37
 
38
+ Scheduled reports persist endpoint and recipient configuration, but not send
39
+ keys or API tokens. Configure `MAILERY_SEND_KEY`, `HASNA_MAILERY_SEND_KEY`,
40
+ `HASNA_LOGS_API_TOKEN`, or the matching service env vars before scheduled runs.
41
+
34
42
  Private/local probes can submit signed results from another machine:
35
43
 
36
44
  ```bash
@@ -91,9 +99,9 @@ claude mcp add --scope user uptime -- uptime-mcp
91
99
  ```
92
100
 
93
101
  The MCP server exposes monitor CRUD, check execution, summary, incident, and
94
- result tools, an `uptime_send_report` tool for report delivery, and local probe
95
- tools for public-key enrollment, job creation/claiming, and signed result
96
- submission.
102
+ result tools, an `uptime_send_report` tool for one-shot report delivery,
103
+ scheduled report tools, local audit event reads, and local probe tools for
104
+ public-key enrollment, job creation/claiming, and signed result submission.
97
105
 
98
106
  ## SDK
99
107
 
@@ -121,6 +129,16 @@ await uptime.sendReport({
121
129
  sms: { apiUrl: "http://localhost:19451", to: "+15550000001" },
122
130
  logs: { apiUrl: "http://localhost:3460", apiKey: process.env.HASNA_LOGS_API_TOKEN, projectId: "open-uptime" },
123
131
  });
132
+
133
+ const schedule = uptime.createReportSchedule({
134
+ name: "ops",
135
+ intervalSeconds: 3600,
136
+ channels: {
137
+ email: { from: "alerts@example.com", to: "ops@example.com" },
138
+ logs: { apiUrl: "http://localhost:3460", projectId: "open-uptime" },
139
+ },
140
+ });
141
+ await uptime.runReportSchedule(schedule.id);
124
142
  ```
125
143
 
126
144
  Probe agents can import signing helpers from `@hasna/uptime/probes`.
@@ -133,6 +151,15 @@ Run `uptime serve` and use:
133
151
  - `GET /api/summary`
134
152
  - `GET /api/report`
135
153
  - `POST /api/report`
154
+ - `GET /api/report-schedules`
155
+ - `POST /api/report-schedules`
156
+ - `GET /api/report-schedules/:id`
157
+ - `PATCH /api/report-schedules/:id`
158
+ - `DELETE /api/report-schedules/:id`
159
+ - `POST /api/report-schedules/:id/run`
160
+ - `POST /api/report-schedules/run-due`
161
+ - `GET /api/report-runs?scheduleId=<id>&limit=100`
162
+ - `GET /api/audit-events?resourceType=<type>&resourceId=<id>`
136
163
  - `GET /api/monitors`
137
164
  - `POST /api/monitors`
138
165
  - `GET /api/monitors/:id`
@@ -152,6 +179,10 @@ check jobs, workspace stores, and audit logging are implemented. Local job reads
152
179
  redact fencing tokens; the claim response is the only API response that returns
153
180
  the active fencing token.
154
181
 
182
+ Hosted `/api/v1/report-schedules*`, `/api/v1/report-runs`, and
183
+ `/api/v1/audit-events` also fail closed until cloud channel refs, workspace
184
+ stores, and cloud audit logging are implemented.
185
+
155
186
  ## Scope
156
187
 
157
188
  First release:
@@ -165,6 +196,7 @@ First release:
165
196
  - local dashboard/API
166
197
  - CLI, MCP, SDK, and tests
167
198
  - Optional report delivery through Open Mailery, Open Telephony, and Open Logs
199
+ - Scheduled report definitions, report run history, and local audit events
168
200
  - Private/local probe identities, check jobs, signed submissions, and fenced
169
201
  result recording for internal agents
170
202