@surfaceapi/mastra 0.1.4 → 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/README.md CHANGED
@@ -6,6 +6,8 @@ This package adds that check to Mastra as one tool: `surface_preflight`.
6
6
 
7
7
  Surface by Canada Site Ops. Ontario, Canada.
8
8
 
9
+ This package also ships an agent skill at `skills/surface-preflight/SKILL.md` (and `SKILL.md` at the package root). Skill installers that scan npm packages will find a keyed init-then-preflight recipe.
10
+
9
11
  ## Get a free API key in about 10 seconds
10
12
 
11
13
  No email, no card. Then set `SURFACE_KEY` or `SURFACE_API_KEY`, or pass `apiKey`. The tool sends it as `Authorization: Bearer <key>`.
package/SKILL.md ADDED
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: surface-preflight
3
+ description: Use when an agent is about to open or fetch a short or unknown http(s) URL (t.co, bit.ly, lnkd.in, youtu.be, or any untrusted link). Surface unwraps the link and answers fetch or skip; it never returns the page. Mint a free API key first, then preflight with that key.
4
+ ---
5
+
6
+ # Surface — keyed link preflight
7
+
8
+ Surface checks a short link before an agent opens it. The answer is fetch or skip. It never returns the page. Free for the first million requests a month.
9
+
10
+ Surface by Canada Site Ops. Ontario, Canada.
11
+
12
+ Host (keep using this origin): https://nova-otter-delta-cloud.grok.me
13
+
14
+ ## Mint a key, then preflight a URL
15
+
16
+ ```bash
17
+ npx @surfaceapi/surface init
18
+ npx @surfaceapi/surface preflight https://youtu.be/jNQXAC9IVRw
19
+ ```
20
+
21
+ After `init` has written `.env`, a bare URL is enough:
22
+
23
+ ```bash
24
+ npx @surfaceapi/surface https://youtu.be/jNQXAC9IVRw
25
+ ```
26
+
27
+ `init` writes `SURFACE_KEY` to `.env`. `preflight` reads that key (`SURFACE_KEY` or `SURFACE_API_KEY`) and calls `POST /v1/preflight`. If no key is set it tells you to run `init` first. It will not send a keyless preflight and will not auto-mint during preflight.
28
+
29
+ You can also mint with `POST https://nova-otter-delta-cloud.grok.me/v1/keys` (no email, no card; 5 new keys per IP per day) and set `SURFACE_KEY`.
30
+
31
+ Python:
32
+
33
+ ```bash
34
+ python -m surfaceapi init
35
+ python -m surfaceapi preflight https://youtu.be/jNQXAC9IVRw
36
+ ```
37
+
38
+ ## MCP
39
+
40
+ Put the minted key in place of `REPLACE_WITH_YOUR_KEY`. Do not send the placeholder.
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "surface": {
46
+ "type": "http",
47
+ "url": "https://nova-otter-delta-cloud.grok.me/mcp",
48
+ "headers": {
49
+ "Authorization": "Bearer REPLACE_WITH_YOUR_KEY"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ Stdio: `npx -y @surfaceapi/mcp` with `env.SURFACE_KEY` set to the same key. Tool: `preflight_url`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surfaceapi/mastra",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Surface for Mastra: the link-safety layer between an AI agent and the open web. One tool, surface_preflight, that answers fetch or skip without returning the page.",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -16,7 +16,9 @@
16
16
  "index.d.ts",
17
17
  "README.md",
18
18
  "LICENSE",
19
- "AGENTS.md"
19
+ "AGENTS.md",
20
+ "SKILL.md",
21
+ "skills/"
20
22
  ],
21
23
  "keywords": [
22
24
  "mastra",
@@ -26,7 +28,10 @@
26
28
  "url",
27
29
  "preflight",
28
30
  "mcp",
29
- "surface"
31
+ "surface",
32
+ "agent-skills",
33
+ "skills",
34
+ "skillfold-skill"
30
35
  ],
31
36
  "author": "Canada Site Ops <canada.site.ops@gmail.com>",
32
37
  "license": "MIT",
@@ -40,5 +45,8 @@
40
45
  },
41
46
  "publishConfig": {
42
47
  "access": "public"
48
+ },
49
+ "agentskills": {
50
+ "surface-preflight": "./skills/surface-preflight"
43
51
  }
44
52
  }
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: surface-preflight
3
+ description: Use when an agent is about to open or fetch a short or unknown http(s) URL (t.co, bit.ly, lnkd.in, youtu.be, or any untrusted link). Surface unwraps the link and answers fetch or skip; it never returns the page. Mint a free API key first, then preflight with that key.
4
+ ---
5
+
6
+ # Surface — keyed link preflight
7
+
8
+ Surface checks a short link before an agent opens it. The answer is fetch or skip. It never returns the page. Free for the first million requests a month.
9
+
10
+ Surface by Canada Site Ops. Ontario, Canada.
11
+
12
+ Host (keep using this origin): https://nova-otter-delta-cloud.grok.me
13
+
14
+ ## Mint a key, then preflight a URL
15
+
16
+ ```bash
17
+ npx @surfaceapi/surface init
18
+ npx @surfaceapi/surface preflight https://youtu.be/jNQXAC9IVRw
19
+ ```
20
+
21
+ After `init` has written `.env`, a bare URL is enough:
22
+
23
+ ```bash
24
+ npx @surfaceapi/surface https://youtu.be/jNQXAC9IVRw
25
+ ```
26
+
27
+ `init` writes `SURFACE_KEY` to `.env`. `preflight` reads that key (`SURFACE_KEY` or `SURFACE_API_KEY`) and calls `POST /v1/preflight`. If no key is set it tells you to run `init` first. It will not send a keyless preflight and will not auto-mint during preflight.
28
+
29
+ You can also mint with `POST https://nova-otter-delta-cloud.grok.me/v1/keys` (no email, no card; 5 new keys per IP per day) and set `SURFACE_KEY`.
30
+
31
+ Python:
32
+
33
+ ```bash
34
+ python -m surfaceapi init
35
+ python -m surfaceapi preflight https://youtu.be/jNQXAC9IVRw
36
+ ```
37
+
38
+ ## MCP
39
+
40
+ Put the minted key in place of `REPLACE_WITH_YOUR_KEY`. Do not send the placeholder.
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "surface": {
46
+ "type": "http",
47
+ "url": "https://nova-otter-delta-cloud.grok.me/mcp",
48
+ "headers": {
49
+ "Authorization": "Bearer REPLACE_WITH_YOUR_KEY"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ Stdio: `npx -y @surfaceapi/mcp` with `env.SURFACE_KEY` set to the same key. Tool: `preflight_url`.