@panaversity/ksor 0.0.3 → 0.0.5
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 +95 -0
- package/README.md +6 -4
- package/dist/cli.mjs +6375 -9
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +1 -36
- package/dist/src-CpDIVudJ.mjs +43 -0
- package/docs/index.md +4 -2
- package/package.json +18 -5
- package/schema/schema.sql +316 -0
- package/templates/scaffold/.agents/skills/format-checker/check.mjs +23 -0
- package/templates/scaffold/.agents/skills/intake-interview/SKILL.md +13 -8
- package/templates/scaffold/.claude/skills/format-checker/check.mjs +23 -0
- package/templates/scaffold/.claude/skills/intake-interview/SKILL.md +13 -8
- package/templates/scaffold/AGENTS.md +142 -10
- package/templates/scaffold/README.md +37 -4
- package/templates/scaffold/env.example +23 -0
- package/templates/scaffold/gitignore +1 -0
- package/templates/scaffold/instance.md +3 -2
- package/templates/scaffold/package.json +9 -1
- package/templates/scaffold/pnpm-workspace.yaml +21 -5
- package/templates/scaffold/vercel.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,100 @@
|
|
|
1
1
|
# @panaversity/ksor
|
|
2
2
|
|
|
3
|
+
## 0.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 995f002: feat: scaffolded projects ship a commented `.env.example` naming every
|
|
8
|
+
variable the agent surface needs — the DSN variable, the provider key, and
|
|
9
|
+
`KSOR_AUTH_DISABLED=1`, which a local run requires because `ksor serve` refuses
|
|
10
|
+
to boot unauthenticated. Copy it to `.env` and it is read automatically.
|
|
11
|
+
|
|
12
|
+
feat: standing up the agent surface is one command and one config block.
|
|
13
|
+
`ksor` now reads `./.env` automatically (Node-native, no dependency; a real
|
|
14
|
+
environment variable still wins), scaffolded projects get `pnpm up` —
|
|
15
|
+
schema → grant → ingest → serve — and `ksor schema --apply` is re-runnable
|
|
16
|
+
instead of failing on an already-provisioned database, so the whole sequence
|
|
17
|
+
is safe to repeat and doubles as the refresh after editing `knowledge/`.
|
|
18
|
+
|
|
19
|
+
fix: a scaffolded project deploys on the first try. The shipped `vercel.json`
|
|
20
|
+
pinned `--frozen-lockfile`, so an adopter's first Vercel import failed with
|
|
21
|
+
`ERR_PNPM_OUTDATED_LOCKFILE` — the scaffold declares a root dependency whose
|
|
22
|
+
stamped version the committed lockfile cannot record.
|
|
23
|
+
|
|
24
|
+
fix: the serve runbook no longer tells first-timers to declare
|
|
25
|
+
`retrieval.vector_floor: uncalibrated` before serving, which made every request
|
|
26
|
+
refuse until a floor was measured. Configuring the record needs one `database:`
|
|
27
|
+
block; the abstention gate is turned on deliberately, after it serves.
|
|
28
|
+
|
|
29
|
+
- 4e84cdf: fix: `ksor serve` reports its real version to MCP clients. In 0.0.4 every
|
|
30
|
+
client saw `serverInfo.version` of `0.0.0`: the gateway read the version from
|
|
31
|
+
an environment variable at module scope, and the CLI's static import evaluated
|
|
32
|
+
that module before the CLI could set the variable. The version now travels as
|
|
33
|
+
an argument, and a test drives the bundled binary to assert it.
|
|
34
|
+
|
|
35
|
+
## 0.0.4
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- 473302a: feat: `@panaversity/ksor` now ships the whole Knowledge System of Record as ONE
|
|
40
|
+
package. The kernel (corpus store, hybrid retrieval, calibrated abstention, and
|
|
41
|
+
the MCP gateway) is bundled into the CLI, which exposes one `ksor` binary with
|
|
42
|
+
all verbs: `init`, `dev`/`build` (still exit 2), `serve` (runs the MCP server
|
|
43
|
+
in-process, reading `./instance.md`), and the corpus operations `ingest`,
|
|
44
|
+
`schema`, `calibrate`, `gc`. An adopter installs one thing and the content SoR
|
|
45
|
+
is always present. Note: the CLI is no longer zero-dependency — installing it
|
|
46
|
+
now pulls the server runtime (pg, the embedding SDK, the MCP SDK).
|
|
47
|
+
|
|
48
|
+
Because MCP serving is a core surface, `ksor init` now declares
|
|
49
|
+
`@panaversity/ksor` as a dependency of the scaffolded project — pinned to the
|
|
50
|
+
exact CLI version that scaffolded it — with `pnpm serve` and `pnpm ingest`
|
|
51
|
+
scripts, so the served tool is a first-class, version-pinned command rather
|
|
52
|
+
than an `npx` afterthought. The scaffold's first `pnpm install` is non-frozen
|
|
53
|
+
(it resolves the tool and writes the lockfile); `pnpm dev` still needs no
|
|
54
|
+
database.
|
|
55
|
+
|
|
56
|
+
The MCP surface ships on the **2026-07-28** spec revision, via SDK v2
|
|
57
|
+
(`@modelcontextprotocol/server`). Since this release is the agent surface's
|
|
58
|
+
debut, it ships current rather than one revision behind: the door serves the
|
|
59
|
+
handshake-free modern era (`server/discover`, per-request envelope) and keeps
|
|
60
|
+
serving 2025-era clients through the same stateless idiom, so nothing that
|
|
61
|
+
works today stops working.
|
|
62
|
+
|
|
63
|
+
New verb: **`ksor grant`** authorizes ingest for a corpus (and `--revoke`
|
|
64
|
+
withdraws it) — the row row-level security requires before any write. It runs
|
|
65
|
+
through the same `pg` driver every other verb uses, so finishing setup no
|
|
66
|
+
longer requires dropping out of ksor into `psql`. Idempotent, and it reports
|
|
67
|
+
the state it established rather than a bare "ok". Kept a separate act from
|
|
68
|
+
`schema --apply` on purpose: a schema step that granted itself write access
|
|
69
|
+
would make the tool its own authorizer.
|
|
70
|
+
|
|
71
|
+
Scaffold serve-rung fixes (from a multi-agent operability review): the
|
|
72
|
+
scaffolded format checker (`pnpm check`) now accepts the `database:`/`embedding:`/
|
|
73
|
+
`retrieval:`/`budgets:` blocks that `ksor serve`/`ingest` require, so a project
|
|
74
|
+
climbing to serving is no longer rejected by its own CI; the scaffold's
|
|
75
|
+
`pnpm ingest` script now `--flip`s (a first ingest without it left the server
|
|
76
|
+
answering from an unactivated generation); the kernel's build-scripted deps
|
|
77
|
+
(`@google/genai`, `protobufjs`) are denied under `allowBuilds` so the first
|
|
78
|
+
install does not exit 1; and the scaffold `AGENTS.md`/`README.md` now carry the
|
|
79
|
+
full serve runbook — the ordered `schema` → grant → `ingest` → `serve` pipeline,
|
|
80
|
+
the `instance.md` block shapes, the env contract, the generation model, and the
|
|
81
|
+
fail-closed security posture.
|
|
82
|
+
|
|
83
|
+
- af53bed: fix: `ksor serve` no longer exits when the database terminates an idle
|
|
84
|
+
connection. The Postgres pool had no `'error'` listener, so an idle client
|
|
85
|
+
dropped by a restart, a failover, or an administrative `pg_terminate_backend`
|
|
86
|
+
became an uncaught exception and killed the process instead of being discarded
|
|
87
|
+
and reconnected. Long-running servers were exposed to this on any routine
|
|
88
|
+
database maintenance; the pool now logs the discarded connection's error class
|
|
89
|
+
and keeps serving.
|
|
90
|
+
- 4fa4906: test(ci): make the scaffold browser e2e reliable — retry `pnpm build` once on the
|
|
91
|
+
known upstream Turbopack static-image flake (`TurbopackInternalError: Input image
|
|
92
|
+
not found`), scoped to that exact signature so a real build break still fails on
|
|
93
|
+
the first try. Test-infrastructure only: the published CLI tarball is unchanged
|
|
94
|
+
(the retry helper is not reachable from the CLI entry and does not ship). The
|
|
95
|
+
durable fix — dropping the scaffold home page's static `app/icon.png` import — is
|
|
96
|
+
tracked as an owner call.
|
|
97
|
+
|
|
3
98
|
## 0.0.3
|
|
4
99
|
|
|
5
100
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -23,11 +23,13 @@ search and `llms.txt`, adopter CI, a dependency-free format checker
|
|
|
23
23
|
operate it. Everything emitted is yours (the templates are MIT-0), the
|
|
24
24
|
scaffold is deterministic and offline, and every refusal explains itself.
|
|
25
25
|
|
|
26
|
-
> **`0.x` status:** `init` works
|
|
27
|
-
>
|
|
28
|
-
>
|
|
26
|
+
> **`0.x` status:** `init` works, and `serve` runs the MCP server over a built
|
|
27
|
+
> record (with `ingest`/`schema`/`calibrate`/`gc` — the climbed rung, needing
|
|
28
|
+
> Postgres and a provider key). Only `dev` and `build` are designed, not
|
|
29
|
+
> implemented — each prints an honest notice and exits `2` (inside a scaffolded
|
|
30
|
+
> project, `pnpm dev` / `pnpm build` cover local work).
|
|
29
31
|
> [`docs/status.md`](https://github.com/panaversity/ksor/blob/main/docs/status.md)
|
|
30
|
-
> and the released version number are authoritative for
|
|
32
|
+
> and the released version number are authoritative for the exact released
|
|
31
33
|
> functionality.
|
|
32
34
|
|
|
33
35
|
Full concept, design goals, and project status:
|