@surfaceapi/openai-agents 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 +2 -0
- package/SKILL.md +56 -0
- package/package.json +11 -3
- package/skills/surface-preflight/SKILL.md +56 -0
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ This package adds that check to the OpenAI Agents SDK as one tool: `surface_pref
|
|
|
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/openai-agents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Surface for openai-agents: 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",
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
"index.js",
|
|
9
9
|
"README.md",
|
|
10
10
|
"LICENSE",
|
|
11
|
-
"AGENTS.md"
|
|
11
|
+
"AGENTS.md",
|
|
12
|
+
"SKILL.md",
|
|
13
|
+
"skills/"
|
|
12
14
|
],
|
|
13
15
|
"keywords": [
|
|
14
16
|
"openai-agents",
|
|
@@ -18,7 +20,10 @@
|
|
|
18
20
|
"url",
|
|
19
21
|
"preflight",
|
|
20
22
|
"mcp",
|
|
21
|
-
"surface"
|
|
23
|
+
"surface",
|
|
24
|
+
"agent-skills",
|
|
25
|
+
"skills",
|
|
26
|
+
"skillfold-skill"
|
|
22
27
|
],
|
|
23
28
|
"author": "Canada Site Ops <canada.site.ops@gmail.com>",
|
|
24
29
|
"license": "MIT",
|
|
@@ -32,5 +37,8 @@
|
|
|
32
37
|
},
|
|
33
38
|
"publishConfig": {
|
|
34
39
|
"access": "public"
|
|
40
|
+
},
|
|
41
|
+
"agentskills": {
|
|
42
|
+
"surface-preflight": "./skills/surface-preflight"
|
|
35
43
|
}
|
|
36
44
|
}
|
|
@@ -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`.
|