@secondlayer/sentinel 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ryan Waits
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # @secondlayer/sentinel
2
+
3
+ Sentinel from a terminal or an agent. Paste a contract, get a monitoring plan, tune what is watched, read alerts. No bun, no repo: Node 22 or newer.
4
+
5
+ ```sh
6
+ npm i -g @secondlayer/sentinel
7
+ sentinel login
8
+ sentinel plans
9
+ ```
10
+
11
+ `sentinel login` signs in with your secondlayer account: your email, then a 6-digit code. It shares `~/.secondlayer/session.json` with the secondlayer CLI, so either login serves both. Open runsentinel.app once first if you have never used Sentinel.
12
+
13
+ For CI, pipe a key from the web app (API keys): `echo "$KEY" | sentinel login --with-token`, or set `SENTINEL_API_KEY`. Order: `SENTINEL_API_KEY`, `--token`, saved key, saved login.
14
+
15
+ ## CLI
16
+
17
+ ```sh
18
+ sentinel new SP….vault # what it would plan and cost; add --yes to start
19
+ sentinel plans # your contracts, monitoring, worst evidence
20
+ sentinel watches <plan> # what is watched
21
+ sentinel alerts # newest first
22
+ sentinel balance # balance and prices
23
+ sentinel --help # everything else
24
+ ```
25
+
26
+ Anything that spends balance or changes monitoring shows what it would do first and only happens with `--yes`.
27
+
28
+ ## MCP
29
+
30
+ ```sh
31
+ claude mcp add sentinel -- npx -y -p @secondlayer/sentinel sentinel-mcp
32
+ ```
33
+
34
+ Uses your login, or add `--env SENTINEL_API_KEY=sk-sl_…` for a scoped key. Every write tool takes `confirm`; without it you get what would happen and nothing changes.
35
+
36
+ ## SDK
37
+
38
+ ```ts
39
+ import { createClient, resolveToken } from "@secondlayer/sentinel";
40
+
41
+ const credential = await resolveToken();
42
+ const sentinel = createClient({ token: credential?.token ?? "" });
43
+ console.log(await sentinel.plans());
44
+ ```
45
+
46
+ Ownership proof, claiming, billing top-ups and key creation stay in the web app.