agentface 0.0.1 → 0.2.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/README.md +66 -1
- package/dist/THIRD_PARTY_NOTICES.txt +157 -0
- package/dist/agentface.mjs +8896 -0
- package/package.json +12 -5
- package/index.js +0 -2
package/README.md
CHANGED
|
@@ -1,3 +1,68 @@
|
|
|
1
1
|
# agentface
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Make a website agent-ready: add Agentface to your project, and check the install.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npx agentface init # register the site and add Agentface to this project
|
|
7
|
+
npx agentface init --pr # ...on a new branch, and open a pull request
|
|
8
|
+
npx agentface check https://example.com
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## init
|
|
12
|
+
|
|
13
|
+
`init` works in the site's project folder:
|
|
14
|
+
|
|
15
|
+
- **Next.js** apps with a server (any host) and **other Vercel projects** get a connector: `proxy.js` or
|
|
16
|
+
`middleware.js`, plus a `Link` header rule in `vercel.json`, and outside Next.js a
|
|
17
|
+
redirect that sends agents asking for Markdown to `/_agent/md/<page>`. Browsers
|
|
18
|
+
never run Agentface code.
|
|
19
|
+
- **Static sites** get one step at the end of the `build` script in `package.json`:
|
|
20
|
+
Next.js with `output: 'export'`, Astro, SvelteKit with `adapter-static`,
|
|
21
|
+
`nuxt generate`, React Router and Remix single-page apps, Gatsby, Docusaurus,
|
|
22
|
+
Eleventy, VitePress, Create React App, Vue CLI, Angular and Vite. `init` finds the
|
|
23
|
+
folder each builds to; for another generator, pass it with `--out <build folder>`:
|
|
24
|
+
`npx --yes agentface@<version> build dist --site <id> --url <address>`. A re-run
|
|
25
|
+
moves that step back to the end, but only in that form: if you call
|
|
26
|
+
`agentface build` another way, `init` adds a second step. It adds
|
|
27
|
+
Markdown copies of the pages, a page index, discovery documents, browser tools and
|
|
28
|
+
crawler rules to the built site, offline. If it fails, the build carries on
|
|
29
|
+
without them.
|
|
30
|
+
|
|
31
|
+
Without a site ID, `init` registers the site with Agentface. It finds the address in
|
|
32
|
+
a `CNAME` file, the `homepage` in `package.json` or a `<user>.github.io` repository,
|
|
33
|
+
or takes `--url https://example.com`. The address must be a whole public `https://`
|
|
34
|
+
domain, so a GitHub project page (`<user>.github.io/<repo>/`) can't be registered. A re-run finds the site in the existing
|
|
35
|
+
install and updates it. `init <site-id>` uses a site you already have.
|
|
36
|
+
|
|
37
|
+
`init` refuses projects it would break: Astro, SvelteKit, Nuxt, Remix and React Router
|
|
38
|
+
apps that run their own server, projects that already have a middleware or
|
|
39
|
+
proxy file, and Vercel config it can't edit (`vercel.ts`, or `vercel.json` with
|
|
40
|
+
`routes`). Add `--dry-run` to see what it would change, without registering or
|
|
41
|
+
writing anything.
|
|
42
|
+
|
|
43
|
+
`--pr` needs a clean working tree, `git` and an authenticated `gh`. The change is
|
|
44
|
+
committed on the `agentface-connector` branch and you're switched back to your
|
|
45
|
+
branch.
|
|
46
|
+
|
|
47
|
+
## check
|
|
48
|
+
|
|
49
|
+
`check` requests the site the way an agent would and reports each check. It finds
|
|
50
|
+
the site through `<url>/_agent/health`, or takes `--site <id>`. Run it against the
|
|
51
|
+
site or a preview deployment. For a preview behind Vercel Deployment Protection,
|
|
52
|
+
add `--bypass <secret>` with the project's Protection Bypass for Automation secret.
|
|
53
|
+
|
|
54
|
+
A site registered by `init` is deleted after 24 hours unless `check` passes on the
|
|
55
|
+
site's own address, which confirms it is yours. If it lapses, run `init` again.
|
|
56
|
+
Until then, Agentface answers only the site's health check. So a new connector
|
|
57
|
+
install starts answering agents once the site's own address serves it: `check`
|
|
58
|
+
there, or the first agent request there, confirms it. A preview of a new connector
|
|
59
|
+
site passes only the health check.
|
|
60
|
+
|
|
61
|
+
Requires Node.js 20 or later.
|
|
62
|
+
|
|
63
|
+
## Development
|
|
64
|
+
|
|
65
|
+
This package is built from `cli/` in the agentface-router repository:
|
|
66
|
+
`npm run build:cli` bundles it into one dependency-free file, `cli/dist/agentface.mjs`,
|
|
67
|
+
with the licenses of the bundled libraries in `cli/dist/THIRD_PARTY_NOTICES.txt`
|
|
68
|
+
(neither is committed).
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
agentface bundles these packages:
|
|
2
|
+
|
|
3
|
+
boolbase 1.0.0
|
|
4
|
+
|
|
5
|
+
ISC license, by Felix Boehm <me@feedic.com> (the package includes no license text)
|
|
6
|
+
|
|
7
|
+
------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
css-select 5.2.2
|
|
10
|
+
|
|
11
|
+
Copyright (c) Felix Böhm
|
|
12
|
+
All rights reserved.
|
|
13
|
+
|
|
14
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
15
|
+
|
|
16
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
17
|
+
|
|
18
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
19
|
+
|
|
20
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
21
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
22
|
+
|
|
23
|
+
------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
css-what 6.2.2
|
|
26
|
+
|
|
27
|
+
Copyright (c) Felix Böhm
|
|
28
|
+
All rights reserved.
|
|
29
|
+
|
|
30
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
31
|
+
|
|
32
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
33
|
+
|
|
34
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
35
|
+
|
|
36
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
37
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
38
|
+
|
|
39
|
+
------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
dom-serializer 2.0.0
|
|
42
|
+
|
|
43
|
+
License
|
|
44
|
+
|
|
45
|
+
(The MIT License)
|
|
46
|
+
|
|
47
|
+
Copyright (c) 2014 The cheeriojs contributors
|
|
48
|
+
|
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
50
|
+
|
|
51
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
52
|
+
|
|
53
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
54
|
+
|
|
55
|
+
------------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
domelementtype 2.3.0
|
|
58
|
+
|
|
59
|
+
Copyright (c) Felix Böhm
|
|
60
|
+
All rights reserved.
|
|
61
|
+
|
|
62
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
63
|
+
|
|
64
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
65
|
+
|
|
66
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
67
|
+
|
|
68
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
69
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
70
|
+
|
|
71
|
+
------------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
domhandler 5.0.3
|
|
74
|
+
|
|
75
|
+
Copyright (c) Felix Böhm
|
|
76
|
+
All rights reserved.
|
|
77
|
+
|
|
78
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
79
|
+
|
|
80
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
81
|
+
|
|
82
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
83
|
+
|
|
84
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
85
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
86
|
+
|
|
87
|
+
------------------------------------------------------------------------
|
|
88
|
+
|
|
89
|
+
domutils 3.2.2
|
|
90
|
+
|
|
91
|
+
Copyright (c) Felix Böhm
|
|
92
|
+
All rights reserved.
|
|
93
|
+
|
|
94
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
95
|
+
|
|
96
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
97
|
+
|
|
98
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
99
|
+
|
|
100
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
101
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
102
|
+
|
|
103
|
+
------------------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
entities 4.5.0
|
|
106
|
+
|
|
107
|
+
Copyright (c) Felix Böhm
|
|
108
|
+
All rights reserved.
|
|
109
|
+
|
|
110
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
111
|
+
|
|
112
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
113
|
+
|
|
114
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
115
|
+
|
|
116
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
117
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
118
|
+
|
|
119
|
+
------------------------------------------------------------------------
|
|
120
|
+
|
|
121
|
+
he 1.2.0
|
|
122
|
+
|
|
123
|
+
MIT license, by Mathias Bynens (the package includes no license text)
|
|
124
|
+
|
|
125
|
+
------------------------------------------------------------------------
|
|
126
|
+
|
|
127
|
+
node-html-markdown 2.0.0
|
|
128
|
+
|
|
129
|
+
MIT license, by Ron S. (the package includes no license text)
|
|
130
|
+
|
|
131
|
+
------------------------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
node-html-parser 6.1.13
|
|
134
|
+
|
|
135
|
+
Copyright 2019 Tao Qiufeng
|
|
136
|
+
|
|
137
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
138
|
+
|
|
139
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
140
|
+
|
|
141
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
142
|
+
|
|
143
|
+
------------------------------------------------------------------------
|
|
144
|
+
|
|
145
|
+
nth-check 2.1.1
|
|
146
|
+
|
|
147
|
+
Copyright (c) Felix Böhm
|
|
148
|
+
All rights reserved.
|
|
149
|
+
|
|
150
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
151
|
+
|
|
152
|
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
153
|
+
|
|
154
|
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
155
|
+
|
|
156
|
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
|
157
|
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|