@panaversity/ksor 0.0.41 → 0.0.42
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/CHANGELOG.md +63 -0
- package/dist/cli.mjs +1 -1
- package/docs/deploying.md +20 -0
- package/docs/ingesting.md +1 -1
- package/package.json +1 -1
- package/templates/scaffold/AGENTS.md +3 -3
- package/templates/scaffold/env.example +3 -2
- package/templates/scaffold/instance.md +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# @panaversity/ksor
|
|
2
2
|
|
|
3
|
+
## 0.0.42
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d55097c: **Document what a deploy actually does to your lock.** `vercel.json` builds the
|
|
8
|
+
site with `pnpm build`, which runs `ksor build` first — so the host regenerates
|
|
9
|
+
every `index.md` and `build.lock.json` before building. That has two
|
|
10
|
+
consequences worth knowing, and neither was written down: you can deploy
|
|
11
|
+
without ever running `ksor build` yourself, and the `build.lock.json` in your
|
|
12
|
+
repository is not necessarily the one that shipped.
|
|
13
|
+
|
|
14
|
+
Nothing changes in behaviour. The record checker still runs on the deploy, so a
|
|
15
|
+
record that breaks the profile still fails there, and the `build_id` that did
|
|
16
|
+
ship is stamped into the deployed `llms.txt`.
|
|
17
|
+
|
|
18
|
+
`docs/deploying.md` now also shows the stricter posture for adopters who want
|
|
19
|
+
the deployed build reviewed before it ships — `buildCommand: "pnpm -C
|
|
20
|
+
system/site build"`, which refuses `ksor-lock-missing` or `ksor-lock-stale`
|
|
21
|
+
until someone runs `ksor build` and commits it. That is one line in your own
|
|
22
|
+
`vercel.json`; ksor ships no flag for it.
|
|
23
|
+
|
|
24
|
+
- abef414: **Fix the release-note lookup, properly this time.** The previous release added
|
|
25
|
+
`releaseNote()` so doc-truth assertions could survive a changeset being folded
|
|
26
|
+
into the changelog. It resolved a consumed note to the NEWEST changelog
|
|
27
|
+
section, which is only correct for the release that consumes it: a note
|
|
28
|
+
consumed in 0.0.41 lives in the 0.0.41 section forever, so by 0.0.42 the lookup
|
|
29
|
+
returned a different release entirely.
|
|
30
|
+
|
|
31
|
+
Two failures came out of that, and the second was worse than the bug it
|
|
32
|
+
replaced: presence assertions went red, and a fenced-block scan went VACUOUS —
|
|
33
|
+
passing because the section handed to it contained no code blocks at all.
|
|
34
|
+
|
|
35
|
+
`releaseNote()` now returns the whole changelog once a note is consumed, plus
|
|
36
|
+
whether the note is still `pending`. Assertions about the PRESENCE of prose use
|
|
37
|
+
the text (finding it anywhere in the changelog proves it shipped); assertions
|
|
38
|
+
about STRUCTURE gate on `pending`, because "every fenced block must show
|
|
39
|
+
`--approve-by`" is a rule about a note still under review, not one to apply to
|
|
40
|
+
the whole published history.
|
|
41
|
+
|
|
42
|
+
Verified in both states and mutation-tested against the released tree: removing
|
|
43
|
+
`--approve-by` or changing the tool-size figure in the changelog turns the
|
|
44
|
+
assertions red.
|
|
45
|
+
|
|
46
|
+
- bfcf900: **A new record already names its DSN variable.** `instance.md`'s
|
|
47
|
+
`database.dsn_env` shipped commented out, so climbing to the served rung began
|
|
48
|
+
with an edit whose only purpose was to delete two `#` characters — and the
|
|
49
|
+
instruction to do it was repeated in four places, one of which (`.env.example`)
|
|
50
|
+
sat right beside a `KSOR_DB_URL=` line that was NOT commented. A first-time
|
|
51
|
+
reader had to notice that one file names the variable and another defines it,
|
|
52
|
+
and that only one of the two needed uncommenting.
|
|
53
|
+
|
|
54
|
+
It is filled in now. Naming an environment variable costs nothing and requires
|
|
55
|
+
no database: `pnpm dev` and `pnpm build` never read it, and the value only has
|
|
56
|
+
to exist when you run `provision`, `refresh` or `serve`. Verified on a real
|
|
57
|
+
scaffold from the published package with the block live and `KSOR_DB_URL`
|
|
58
|
+
unset — `check`, `ksor build` and a full static site build all succeed, and the
|
|
59
|
+
record publishes.
|
|
60
|
+
|
|
61
|
+
So the served rung is now: set `KSOR_DB_URL` in `.env`, then `provision`,
|
|
62
|
+
`refresh`, `serve`. The step that was pure ceremony is gone, and `ksor init`'s
|
|
63
|
+
own next-steps, the scaffold's `AGENTS.md`, `.env.example` and
|
|
64
|
+
`docs/ingesting.md` all say the same thing.
|
|
65
|
+
|
|
3
66
|
## 0.0.41
|
|
4
67
|
|
|
5
68
|
### Patch Changes
|
package/dist/cli.mjs
CHANGED
|
@@ -13324,7 +13324,7 @@ function handoff(io, name, targetWasDot, manager) {
|
|
|
13324
13324
|
Next (or just tell your coding agent to take it from here):
|
|
13325
13325
|
` + enter + ` ${install}\n ${run("dev").padEnd(15)} # the site, live at http://localhost:3000\n
|
|
13326
13326
|
Then, for the agent surface (needs Postgres and a provider key):
|
|
13327
|
-
${run("provision").padEnd(15)} # once:
|
|
13327
|
+
${run("provision").padEnd(15)} # once: copy .env.example to .env and set KSOR_DB_URL,\n # then apply the schema
|
|
13328
13328
|
${run("refresh").padEnd(15)} # PUBLISH the record — ingest knowledge/ into a generation\n ${run("serve").padEnd(15)} # the MCP server, over what you just published\n
|
|
13329
13329
|
` + pnpmHint + "Start in knowledge/ — AGENTS.md carries the working rules.\n");
|
|
13330
13330
|
}
|
package/docs/deploying.md
CHANGED
|
@@ -254,6 +254,26 @@ and reaches the site at its next build (it reads the ledger), so the act that
|
|
|
254
254
|
withdraws a document is the same merged commit on both surfaces. Merge the
|
|
255
255
|
ledger entry, rebuild, redeploy.
|
|
256
256
|
|
|
257
|
+
**Your deploy runs it too, and that is deliberate.** `vercel.json` builds with
|
|
258
|
+
`pnpm build`, so the host regenerates the indexes and the lock before building
|
|
259
|
+
the site. The consequence is worth knowing in both directions: you can deploy
|
|
260
|
+
without ever having run `ksor build` yourself — the record checker still runs
|
|
261
|
+
there, so a record that breaks the profile still fails the deploy — but the
|
|
262
|
+
`build.lock.json` in your repository is not necessarily the one that shipped.
|
|
263
|
+
The `build_id` that DID ship is stamped into the deployed `llms.txt`.
|
|
264
|
+
|
|
265
|
+
If you want the stricter property — the deployed build_id is one a human
|
|
266
|
+
reviewed in a pull request — build the site alone instead:
|
|
267
|
+
|
|
268
|
+
```json
|
|
269
|
+
"buildCommand": "pnpm -C system/site build"
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
The site refuses `ksor-lock-missing` or `ksor-lock-stale` when the committed
|
|
273
|
+
lock does not describe the tree, so a deploy then fails until someone runs
|
|
274
|
+
`ksor build` and commits the result. That is your file to change; ksor does not
|
|
275
|
+
choose it for you.
|
|
276
|
+
|
|
257
277
|
## Keeping people out of the site
|
|
258
278
|
|
|
259
279
|
The door has auth ([authorization.md](./authorization.md)). The **site** is
|
package/docs/ingesting.md
CHANGED
|
@@ -25,7 +25,7 @@ created for you.
|
|
|
25
25
|
| **The corpus** | `knowledge/` at your repo root — CommonMark `.md`, one document per file, in the KSoR Profile of OKF: `type`, `title`, `description`, `status` and `ksor.audience` in frontmatter | `pnpm check` validates it and explains any violation; `ksor build` must have written a current `build.lock.json` before ingest will run |
|
|
26
26
|
| **The database** | Postgres with **pgvector** — `CREATE EXTENSION vector;` | any managed host; the DDL below needs a role that can create tables |
|
|
27
27
|
| **The provider key** | `GEMINI_API_KEY` — the default embedding provider is `gemini-embedding-001` | [aistudio.google.com](https://aistudio.google.com/apikey); the free tier covers a first corpus |
|
|
28
|
-
| **The DSN** | `KSOR_DB_URL`, named by `instance.md`'s `database.dsn_env` |
|
|
28
|
+
| **The DSN** | `KSOR_DB_URL`, named by `instance.md`'s `database.dsn_env` | already named by `instance.md`'s `database:` block |
|
|
29
29
|
|
|
30
30
|
Both variables go in `.env` beside `instance.md` — `ksor` reads it automatically,
|
|
31
31
|
and `.env` is gitignored. Every command below is run **from your repository
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panaversity/ksor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"description": "Knowledge System of Record — compile governed markdown into a static site for people and an MCP server for AI agents, with citations and measured abstention.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"abstention",
|
|
@@ -60,9 +60,9 @@ pnpm check # the format checker — run before handing off any knowledge c
|
|
|
60
60
|
with honest abstention. It is the climbed rung — not required for `pnpm dev`.
|
|
61
61
|
Stand it up in this order (each step's errors explain how to fix themselves):
|
|
62
62
|
|
|
63
|
-
1. **
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
1. **Check `instance.md`.** The one required block is already filled in — it
|
|
64
|
+
names the environment variable holding your DSN (never the DSN itself), and
|
|
65
|
+
there is nothing to do here unless you want a different variable name:
|
|
66
66
|
|
|
67
67
|
```yaml
|
|
68
68
|
database:
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
# A real environment variable always wins over this file, so CI and production
|
|
3
3
|
# keep their own values.
|
|
4
4
|
|
|
5
|
-
# The Postgres store
|
|
6
|
-
# `database
|
|
5
|
+
# The Postgres store. instance.md already names this variable in its
|
|
6
|
+
# `database.dsn_env`, so setting it here is the whole of the wiring.
|
|
7
|
+
# Needs the pgvector extension:
|
|
7
8
|
# CREATE EXTENSION vector;
|
|
8
9
|
# On a remote host prefer sslmode=verify-full, which states the TLS posture
|
|
9
10
|
# explicitly instead of relying on a driver default that is due to change.
|
|
@@ -6,17 +6,20 @@ description: What a Knowledge System of Record is, how a project climbs the gove
|
|
|
6
6
|
toolchain:
|
|
7
7
|
requires: ">=KSOR-STAMP-VERSION"
|
|
8
8
|
scaffolded: "KSOR-STAMP-VERSION"
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
9
|
+
# `database.dsn_env` names the environment variable holding your Postgres DSN —
|
|
10
|
+
# never the DSN itself, which belongs in .env. It is filled in because naming a
|
|
11
|
+
# variable costs nothing and needs no database: `pnpm dev` and `pnpm build` do
|
|
12
|
+
# not read it, and the value only has to exist when you climb to the served
|
|
13
|
+
# rung. To climb: copy .env.example to .env and set KSOR_DB_URL, then
|
|
14
|
+
# `pnpm provision` once (schema + grant), then `pnpm refresh` to PUBLISH the
|
|
15
|
+
# record, then `pnpm serve`. Serving does not publish — that is deliberate, and
|
|
16
|
+
# skipping refresh serves nothing.
|
|
14
17
|
# Nothing else here is required:
|
|
15
18
|
# `embedding:` already defaults to Gemini at 1536 dimensions, and leaving
|
|
16
19
|
# `retrieval:` out starts you with the abstention gate off and honest about it
|
|
17
20
|
# (turn it on afterwards with `ksor calibrate`, once the record is serving).
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
database:
|
|
22
|
+
dsn_env: KSOR_DB_URL
|
|
20
23
|
# Where agents reach this record's MCP surface, and the semver it publishes as.
|
|
21
24
|
# Both go into /.well-known/mcp/server.json, the document an agent reads to
|
|
22
25
|
# DISCOVER this record instead of being told the URL. Leave mcp_url out until
|