@thierry-gilgen-ict/engawa-core 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 +73 -2
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# @thierry-gilgen-ict/engawa-core
|
|
2
2
|
|
|
3
|
-
Framework-independent core for Engawa: configuration, normalized resources, content adapters, and
|
|
3
|
+
Framework-independent core for Engawa: configuration, normalized resources, content adapters, and `createEngawa`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Stability:** Early v0.x. API may change before 1.0.
|
|
6
|
+
|
|
7
|
+
## When you need this package
|
|
8
|
+
|
|
9
|
+
Always, for any Engawa integration. Other Engawa packages depend on it.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @thierry-gilgen-ict/engawa-core@0.1.0
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Requires **Node.js 24+** (package `engines` enforced in 0.1.1+).
|
|
18
|
+
|
|
19
|
+
## Minimal example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import {
|
|
23
|
+
createEngawa,
|
|
24
|
+
StaticContentAdapter,
|
|
25
|
+
validateEngawaConfig,
|
|
26
|
+
} from "@thierry-gilgen-ict/engawa-core";
|
|
27
|
+
|
|
28
|
+
const config = validateEngawaConfig({
|
|
29
|
+
site: {
|
|
30
|
+
name: "My Site",
|
|
31
|
+
canonicalUrl: "https://www.example.com",
|
|
32
|
+
description: "Public site description.",
|
|
33
|
+
language: "en",
|
|
34
|
+
},
|
|
35
|
+
agentInterface: { enabled: true, public: true },
|
|
36
|
+
security: { publicDefault: "read-only" },
|
|
37
|
+
metadata: { version: "0.1.0" },
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const adapter = new StaticContentAdapter(config.site.canonicalUrl, [
|
|
41
|
+
{ id: "about", title: "About", content: "# About\n\nText.", path: "/about.md" },
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
const engawa = createEngawa(config, adapter);
|
|
45
|
+
const resources = await engawa.listResources();
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Key exports
|
|
49
|
+
|
|
50
|
+
| Export | Purpose |
|
|
51
|
+
| ------------------------------------------- | -------------------------------------------- |
|
|
52
|
+
| `validateEngawaConfig` | Parse and normalize site config |
|
|
53
|
+
| `createEngawa` | Bind config + adapter with validation bounds |
|
|
54
|
+
| `ContentAdapter` | Interface for public corpus |
|
|
55
|
+
| `StaticContentAdapter` | In-memory demo / small sites |
|
|
56
|
+
| `EngawaResource`, `EngawaConfig` | Types |
|
|
57
|
+
| `buildResourceUri`, `normalizeCanonicalUrl` | URI helpers |
|
|
58
|
+
|
|
59
|
+
## Sibling packages
|
|
60
|
+
|
|
61
|
+
- `@thierry-gilgen-ict/engawa-discovery` — llms.txt (uses resources from core)
|
|
62
|
+
- `@thierry-gilgen-ict/engawa-mcp` — MCP server (uses `Engawa` instance)
|
|
63
|
+
- `@thierry-gilgen-ict/engawa-react` — optional BYA UI
|
|
64
|
+
|
|
65
|
+
## Security
|
|
66
|
+
|
|
67
|
+
Adapters define the public corpus. Engawa validates resource shape and size at the boundary but does **not** decide what is public—your adapter does. See [content publication rule](https://github.com/thierry-gilgen-ict/engawa/blob/main/docs/content-publication.md).
|
|
68
|
+
|
|
69
|
+
## Documentation
|
|
70
|
+
|
|
71
|
+
- [Getting started](https://github.com/thierry-gilgen-ict/engawa/blob/main/docs/getting-started.md)
|
|
72
|
+
- [Security model](https://github.com/thierry-gilgen-ict/engawa/blob/main/docs/security-model.md)
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thierry-gilgen-ict/engawa-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Framework-independent core for Engawa agent-native websites",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,5 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=24"
|
|
39
42
|
}
|
|
40
43
|
}
|