@chronicle.app/schema 0.1.0 → 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 +17 -14
- package/package.json +6 -8
- package/docs/schema.html +0 -3217
package/README.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
A deliberately small extraction vocabulary with generated TypeScript interfaces
|
|
4
4
|
and Zod validators. The canonical file is [chronicle.ttl](chronicle.ttl); edit it and run
|
|
5
|
-
`npm run schema:generate` from the repository root
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
without rewriting them.
|
|
5
|
+
`npm run schema:generate` from the repository root to regenerate the TypeScript/Zod
|
|
6
|
+
schemas. `npm run schema:check` verifies that the committed output matches the
|
|
7
|
+
ontology without rewriting it.
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
## Documentation site
|
|
10
|
+
|
|
11
|
+
The schema is documented at https://schema.chronicle.app, built from
|
|
12
|
+
`chronicle.ttl` and the example records in [examples.ttl](examples.ttl). The
|
|
13
|
+
site lives in [apps/schema-site](../../apps/schema-site), which also describes
|
|
14
|
+
the examples format.
|
|
15
15
|
|
|
16
16
|
## Vocabulary
|
|
17
17
|
|
|
@@ -25,8 +25,9 @@ realms; iMessage adds messages and attachment media; Claude Code adds threads,
|
|
|
25
25
|
software agents, and model instruments. Shared properties cover source identity,
|
|
26
26
|
event time, agents, membership, authors, and recipients.
|
|
27
27
|
|
|
28
|
-
`Text`, `URL`, and `DateTime` are literal datatypes.
|
|
29
|
-
`chronicle.ttl` defines
|
|
28
|
+
`Text`, `URL`, and `DateTime` are literal datatypes. Cardinality in
|
|
29
|
+
`chronicle.ttl` defines each property's constraints: `owl:minCardinality 1` makes
|
|
30
|
+
it required, and `owl:maxCardinality 1` makes it single-valued; otherwise it is a list. Records carry `@type` and at least one of `@key` (a nonempty list of
|
|
30
31
|
identity fields or computed key entries) or `@id` (an existing identity).
|
|
31
32
|
Identity validation checks that declaration, not the existence or hash of the
|
|
32
33
|
referenced fields. Source-specific extraction owns the values; never invent IDs
|
|
@@ -91,9 +92,11 @@ The publication convention is
|
|
|
91
92
|
`https://schema.chronicle.app/releases/<version>/chronicle.ttl`, with matching
|
|
92
93
|
documentation under the same release path. Published snapshots must never be
|
|
93
94
|
overwritten or removed by later deployments. The unversioned `/chronicle.ttl`
|
|
94
|
-
and term pages
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
and term pages serve `main`, so `main` holds only vocabulary that is ready to
|
|
96
|
+
publish: work on new terms in a branch until it is ready. Any change to
|
|
97
|
+
`chronicle.ttl` after a release must raise `owl:versionInfo`;
|
|
98
|
+
`npm run schema:check` enforces this against the latest release tag. See [Preparing a release](../../RELEASING.md) for the
|
|
99
|
+
release procedure.
|
|
97
100
|
|
|
98
101
|
The vocabulary is intentionally small. Add terms only when a plugin needs them,
|
|
99
102
|
keeping existing term identifiers and meanings stable; regenerate and add
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chronicle.app/schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Minimal Chronicle extraction vocabulary and generated TypeScript/Zod schemas",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -11,19 +11,17 @@
|
|
|
11
11
|
"import": "./dist/index.js"
|
|
12
12
|
},
|
|
13
13
|
"./chronicle.ttl": "./chronicle.ttl",
|
|
14
|
-
"./schema.html": "./docs/schema.html",
|
|
15
14
|
"./schema.ttl": "./chronicle.ttl"
|
|
16
15
|
},
|
|
17
16
|
"files": [
|
|
18
17
|
"dist/*.js",
|
|
19
18
|
"dist/*.d.ts",
|
|
20
|
-
"chronicle.ttl"
|
|
21
|
-
"docs/schema.html"
|
|
19
|
+
"chronicle.ttl"
|
|
22
20
|
],
|
|
23
21
|
"scripts": {
|
|
24
|
-
"generate": "node scripts/generate-schemas.js
|
|
25
|
-
"generate:docs": "node scripts/generate-docs.js",
|
|
22
|
+
"generate": "node scripts/generate-schemas.js",
|
|
26
23
|
"generate:check": "node scripts/check-generated.js",
|
|
24
|
+
"version:check": "node scripts/check-version.js",
|
|
27
25
|
"build": "tsc -b tsconfig.lib.json",
|
|
28
26
|
"typecheck": "tsc -p tsconfig.json",
|
|
29
27
|
"test": "node --test src/*.test.js scripts/*.test.js",
|
|
@@ -36,8 +34,8 @@
|
|
|
36
34
|
"zod": "^3.24.1"
|
|
37
35
|
},
|
|
38
36
|
"devDependencies": {
|
|
39
|
-
"@chronicle.app/
|
|
40
|
-
"@chronicle.app/
|
|
37
|
+
"@chronicle.app/prettier-config": "0.2.0",
|
|
38
|
+
"@chronicle.app/tsconfig": "0.2.0",
|
|
41
39
|
"@types/node": "^22.10.1",
|
|
42
40
|
"n3": "^1.23.1",
|
|
43
41
|
"prettier": "^3.6.2",
|