@hasna/uptime 0.1.3 → 0.1.5

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,53 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.5] - 2026-06-28
10
+
11
+ ### Added
12
+
13
+ - Dry-run AWS deployment plan generator for the `hasna-xyz-infra` target,
14
+ covering ECS/Fargate services, ECR image commands, ALB/RDS/S3/Secrets/Logs
15
+ resources, rollback steps, and safety assertions.
16
+ - Spark01 cloud-primary private probe config generator with JSON and env-file
17
+ rendering.
18
+ - CLI commands `uptime cloud plan` and `uptime cloud spark01-config`.
19
+ - SDK export `@hasna/uptime/cloud-plan`.
20
+ - Machine-readable `blocked`/`canApply:false` and `blocked`/`canStart:false`
21
+ gates plus blocker/evidence lists for AWS and Spark01 planning artifacts.
22
+
23
+ ### Security
24
+
25
+ - Cloud planning artifacts contain secret names/refs and file paths only; they
26
+ do not inline AWS credentials, hosted tokens, or private probe key material.
27
+ - Cloud plan generation is dry-run only and does not call AWS.
28
+ - Dry-run AWS output avoids copy-pastable live AWS mutation commands.
29
+
30
+ ## [0.1.4] - 2026-06-28
31
+
32
+ ### Added
33
+
34
+ - Local scheduled uptime reports with persisted schedules, run history, and due
35
+ execution through Mailery email, Telephony SMS, and Open Logs.
36
+ - CLI commands under `uptime report-schedules` plus `uptime audit`.
37
+ - Local API and MCP surfaces for report schedules, report runs, and audit
38
+ events.
39
+ - Immutable local audit events for report schedule create/update/delete/run
40
+ actions.
41
+
42
+ ### Changed
43
+
44
+ - Bumped the local SQLite schema to version 3 while keeping schema version 1
45
+ and 2 backups restorable when they only lack newer probe/report/audit tables.
46
+ - Hosted report schedule routes fail closed until cloud channel refs, workspace
47
+ stores, and audit logging are implemented.
48
+
49
+ ### Security
50
+
51
+ - Persisted report schedules reject inline API keys and tokens; scheduled runs
52
+ resolve Mailery/Open Logs credentials from environment variables or future
53
+ cloud channel refs.
54
+ - Audit metadata redacts token/key/secret-like fields before persistence.
55
+
9
56
  ## [0.1.3] - 2026-06-28
10
57
 
11
58
  ### Added
package/README.md CHANGED
@@ -27,10 +27,25 @@ 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
34
+ uptime cloud plan --json
35
+ uptime cloud spark01-config --probe-id prb_spark01 --env
30
36
  uptime incidents
31
37
  uptime serve --port 3899 --check
32
38
  ```
33
39
 
40
+ Scheduled reports persist endpoint and recipient configuration, but not send
41
+ keys or API tokens. Configure `MAILERY_SEND_KEY`, `HASNA_MAILERY_SEND_KEY`,
42
+ `HASNA_LOGS_API_TOKEN`, or the matching service env vars before scheduled runs.
43
+
44
+ The `uptime cloud ...` commands generate dry-run AWS/Spark01 planning artifacts
45
+ only. They do not call AWS, write secrets, or produce an approved deploy script;
46
+ current output is intentionally blocked until the infra and cloud-store evidence
47
+ in `docs/aws-deployment-runbook.md` is satisfied.
48
+
34
49
  Private/local probes can submit signed results from another machine:
35
50
 
36
51
  ```bash
@@ -91,9 +106,9 @@ claude mcp add --scope user uptime -- uptime-mcp
91
106
  ```
92
107
 
93
108
  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.
109
+ result tools, an `uptime_send_report` tool for one-shot report delivery,
110
+ scheduled report tools, local audit event reads, and local probe tools for
111
+ public-key enrollment, job creation/claiming, and signed result submission.
97
112
 
98
113
  ## SDK
99
114
 
@@ -121,6 +136,16 @@ await uptime.sendReport({
121
136
  sms: { apiUrl: "http://localhost:19451", to: "+15550000001" },
122
137
  logs: { apiUrl: "http://localhost:3460", apiKey: process.env.HASNA_LOGS_API_TOKEN, projectId: "open-uptime" },
123
138
  });
139
+
140
+ const schedule = uptime.createReportSchedule({
141
+ name: "ops",
142
+ intervalSeconds: 3600,
143
+ channels: {
144
+ email: { from: "alerts@example.com", to: "ops@example.com" },
145
+ logs: { apiUrl: "http://localhost:3460", projectId: "open-uptime" },
146
+ },
147
+ });
148
+ await uptime.runReportSchedule(schedule.id);
124
149
  ```
125
150
 
126
151
  Probe agents can import signing helpers from `@hasna/uptime/probes`.
@@ -133,6 +158,15 @@ Run `uptime serve` and use:
133
158
  - `GET /api/summary`
134
159
  - `GET /api/report`
135
160
  - `POST /api/report`
161
+ - `GET /api/report-schedules`
162
+ - `POST /api/report-schedules`
163
+ - `GET /api/report-schedules/:id`
164
+ - `PATCH /api/report-schedules/:id`
165
+ - `DELETE /api/report-schedules/:id`
166
+ - `POST /api/report-schedules/:id/run`
167
+ - `POST /api/report-schedules/run-due`
168
+ - `GET /api/report-runs?scheduleId=<id>&limit=100`
169
+ - `GET /api/audit-events?resourceType=<type>&resourceId=<id>`
136
170
  - `GET /api/monitors`
137
171
  - `POST /api/monitors`
138
172
  - `GET /api/monitors/:id`
@@ -152,6 +186,10 @@ check jobs, workspace stores, and audit logging are implemented. Local job reads
152
186
  redact fencing tokens; the claim response is the only API response that returns
153
187
  the active fencing token.
154
188
 
189
+ Hosted `/api/v1/report-schedules*`, `/api/v1/report-runs`, and
190
+ `/api/v1/audit-events` also fail closed until cloud channel refs, workspace
191
+ stores, and cloud audit logging are implemented.
192
+
155
193
  ## Scope
156
194
 
157
195
  First release:
@@ -165,6 +203,7 @@ First release:
165
203
  - local dashboard/API
166
204
  - CLI, MCP, SDK, and tests
167
205
  - Optional report delivery through Open Mailery, Open Telephony, and Open Logs
206
+ - Scheduled report definitions, report run history, and local audit events
168
207
  - Private/local probe identities, check jobs, signed submissions, and fenced
169
208
  result recording for internal agents
170
209