@thierry-gilgen-ict/engawa-discovery 0.1.0 → 0.1.1
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 +52 -2
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @thierry-gilgen-ict/engawa-discovery
|
|
2
2
|
|
|
3
|
-
Generates deterministic [llms.txt v2](https://llmstxt.org/) files and
|
|
3
|
+
Generates deterministic [llms.txt v2](https://llmstxt.org/) files and HTML discovery link metadata (`rel="alternate"`, `rel="describedby"`).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Stability:** Early v0.x. API may change before 1.0.
|
|
6
|
+
|
|
7
|
+
## When you need this package
|
|
8
|
+
|
|
9
|
+
Expose `GET /llms.txt` or add `rel="describedby"` links on HTML pages.
|
|
10
|
+
|
|
11
|
+
## When you don't
|
|
12
|
+
|
|
13
|
+
You hand-author discovery files with no Engawa resource model (unusual).
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @thierry-gilgen-ict/engawa-discovery@0.1.0
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Requires **Node.js 24+** (with engawa-core 0.1.1+). Depends on `@thierry-gilgen-ict/engawa-core`.
|
|
22
|
+
|
|
23
|
+
## Minimal example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { createEngawa, StaticContentAdapter } from "@thierry-gilgen-ict/engawa-core";
|
|
27
|
+
import { generateLlmsTxt, getLlmsTxtUrl } from "@thierry-gilgen-ict/engawa-discovery";
|
|
28
|
+
|
|
29
|
+
// ... config + adapter + engawa (see engawa-core README)
|
|
30
|
+
|
|
31
|
+
const resources = await engawa.listResources();
|
|
32
|
+
const body = generateLlmsTxt(engawa.config, resources);
|
|
33
|
+
const llmsUrl = getLlmsTxtUrl(engawa.config); // https://site/llms.txt
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Key exports
|
|
37
|
+
|
|
38
|
+
| Export | Purpose |
|
|
39
|
+
| ------------------- | ------------------------------------------- |
|
|
40
|
+
| `generateLlmsTxt` | Build llms.txt body from config + resources |
|
|
41
|
+
| `getLlmsTxtUrl` | Canonical llms.txt URL |
|
|
42
|
+
| `getDiscoveryLinks` | `rel` link objects for HTML headers |
|
|
43
|
+
| `formatLinkHeader` | HTTP `Link` header string |
|
|
44
|
+
|
|
45
|
+
## Security
|
|
46
|
+
|
|
47
|
+
llms.txt lists only resources your adapter registered. It does not leak hidden CMS rows by itself—adapter discipline required.
|
|
48
|
+
|
|
49
|
+
## Documentation
|
|
50
|
+
|
|
51
|
+
[Getting started](https://github.com/thierry-gilgen-ict/engawa/blob/main/docs/getting-started.md)
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thierry-gilgen-ict/engawa-discovery",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "llms.txt v2 generation and discovery link metadata for Engawa",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,9 +27,12 @@
|
|
|
27
27
|
"LICENSE"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@thierry-gilgen-ict/engawa-core": "0.1.
|
|
30
|
+
"@thierry-gilgen-ict/engawa-core": "0.1.1"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=24"
|
|
34
37
|
}
|
|
35
38
|
}
|