@crewx/notify 0.1.0-rc.8 → 0.1.0-rc.9
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/SKILL.md +23 -23
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -8,8 +8,8 @@ metadata:
|
|
|
8
8
|
|
|
9
9
|
# Notify
|
|
10
10
|
|
|
11
|
-
`notify
|
|
12
|
-
|
|
11
|
+
`notify` is the CLI CrewX agents use to send a single in-app notification to the user.
|
|
12
|
+
It sends the notification to the server's `POST /api/v1/notifications` endpoint and prints the notification id on success.
|
|
13
13
|
|
|
14
14
|
## Commands
|
|
15
15
|
|
|
@@ -18,10 +18,10 @@ npx crewx notify "<title>" [--level=info|warning|critical] [--body="..."]
|
|
|
18
18
|
npx crewx notify usage
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
- `title` (
|
|
22
|
-
- `--level` —
|
|
23
|
-
- `--body` —
|
|
24
|
-
- `usage` —
|
|
21
|
+
- `title` (required) — Notification title. Passed as a positional argument.
|
|
22
|
+
- `--level` — Severity. One of `info` (default) | `warning` | `critical`. Errors if outside the whitelist.
|
|
23
|
+
- `--body` — Optional. Detailed body text.
|
|
24
|
+
- `usage` — Prints this `SKILL.md` as-is.
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
npx crewx notify "Deploy needs approval" --level=warning --body="Staging is green; confirm prod."
|
|
@@ -29,35 +29,35 @@ npx crewx notify "Deploy needs approval" --level=warning --body="Staging is gree
|
|
|
29
29
|
|
|
30
30
|
## When To Use
|
|
31
31
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
32
|
+
- To send a signal that needs the user's judgment or approval after a run finishes (e.g. a deploy waiting on approval, progress stalled on a decision)
|
|
33
|
+
- To notify events that a human should check, such as scheduled task (cron/schedule) alerts
|
|
34
|
+
- To report a risk or warning situation that needs the user's attention
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
When not to use:
|
|
37
37
|
|
|
38
|
-
-
|
|
38
|
+
- Routine success logs or progress updates — notifications are only for signals that require human attention.
|
|
39
39
|
|
|
40
40
|
## Levels
|
|
41
41
|
|
|
42
42
|
| Level | Meaning |
|
|
43
43
|
|----------|---------|
|
|
44
|
-
| `info` |
|
|
45
|
-
| `warning` |
|
|
46
|
-
| `critical` |
|
|
44
|
+
| `info` | General informational notification (default) |
|
|
45
|
+
| `warning` | Situation that needs attention |
|
|
46
|
+
| `critical` | Serious situation requiring immediate action |
|
|
47
47
|
|
|
48
48
|
## Environment
|
|
49
49
|
|
|
50
50
|
| Variable | Purpose |
|
|
51
51
|
|----------|---------|
|
|
52
|
-
| `CREWX_WORKSPACE` |
|
|
53
|
-
| `CREWX_ENDPOINT` | CrewX
|
|
54
|
-
| `CREWX_API_TOKEN` |
|
|
55
|
-
| `CREWX_AGENT_ID` |
|
|
56
|
-
| `CREWX_TASK_ID` |
|
|
57
|
-
| `CREWX_THREAD_ID` |
|
|
52
|
+
| `CREWX_WORKSPACE` | Absolute workspace path to route the notification to (required) |
|
|
53
|
+
| `CREWX_ENDPOINT` | CrewX server URL (default `http://localhost:8150`) |
|
|
54
|
+
| `CREWX_API_TOKEN` | Access token for remote servers. Not required for local (localhost) |
|
|
55
|
+
| `CREWX_AGENT_ID` | Id of the agent that created the notification (included if present) |
|
|
56
|
+
| `CREWX_TASK_ID` | Related task id (included if present) |
|
|
57
|
+
| `CREWX_THREAD_ID` | Related thread id (included if present) |
|
|
58
58
|
|
|
59
59
|
## Notes
|
|
60
60
|
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
61
|
+
- The local server works without an auth token (the server's loopback bypass). Only remote servers require `CREWX_API_TOKEN`.
|
|
62
|
+
- A successful response looks like `201 { success: true, data: { id } }`, and the CLI prints the id of the sent notification.
|
|
63
|
+
- On network/HTTP failure, check the server status first.
|