@panaversity/ksor 0.0.22 → 0.0.24

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 CHANGED
@@ -1,5 +1,76 @@
1
1
  # @panaversity/ksor
2
2
 
3
+ ## 0.0.24
4
+
5
+ ### Patch Changes
6
+
7
+ - cbdc4c2: The MCP tool surface is now adopter-owned code. `ksor init` emits
8
+ `system/gateways/content.ts` — ordinary `registerTool` calls with ordinary zod —
9
+ where a record sets what its tools are called, what it says it covers, what they
10
+ accept, and which of them exist at all.
11
+
12
+ Agents are the operator, and an agent pays for this surface out of its context
13
+ window twice. Measured against a live 81-document record: the three tool
14
+ definitions cost ~2,990 tokens and stay resident for the whole session, and one
15
+ `search` at the default `k=10` costs ~3,541 tokens per call. Until now a record
16
+ could change none of it. Deleting the two tools your agents never call gives back
17
+ ~1,643 tokens a session — verified live at 5,337 bytes of definitions against the
18
+ default's 11,960.
19
+
20
+ Real code rather than a config API, because models are trained on the MCP SDK and
21
+ on zod and not on our field names — and because `registerTool` lets a record add
22
+ its own tools, which no config schema could have anticipated. One import
23
+ (`@panaversity/ksor/gateway`, which re-exports `z` and `McpServer`), so a
24
+ registration stays a file: no package, no build step, nothing new in your
25
+ lockfile. It is **deletable** — without it the door serves the identical surface.
26
+
27
+ The handlers, output schemas and framework description text stay in the package,
28
+ because a hand-written handler returning fabricated hits with plausible
29
+ `stable_id`s passes every shape check there is. Your prose composes ABOVE the
30
+ framework text, never instead of it — and since that is now a template literal in
31
+ a file you own, **the door inspects its own served surface at boot** and refuses
32
+ to start when a guarantee is gone: `ksor-gateway-floor-missing`,
33
+ `ksor-gateway-no-tools`, `ksor-gateway-unloadable`.
34
+
35
+ Adds a public subpath export, `@panaversity/ksor/gateway`.
36
+
37
+ New: `docs/tool-surface.md`.
38
+
39
+ ## 0.0.23
40
+
41
+ ### Patch Changes
42
+
43
+ - 6d306a2: Ship the deployment artifacts: `ksor init` now emits a `Dockerfile` and
44
+ `.dockerignore`, and its `vercel.json` declares both surfaces — the static site
45
+ and the MCP door — behind one domain.
46
+
47
+ The served MCP rung is a core surface, not an optional extra, so a scaffolded
48
+ project should be able to reach a host without anyone hand-writing a container
49
+ recipe first. The emitted `Dockerfile` names no vendor: it installs the pinned
50
+ `@panaversity/ksor`, honours `$PORT`, and runs `ksor serve`, so the same image
51
+ runs on Cloud Run, Fly, Render, ECS, Kubernetes or a VPS. `vercel.json` points
52
+ AT that file rather than replacing it, which is what keeps the host a choice —
53
+ moving is a redeploy, not a rewrite. A test asserts that neutrality directly,
54
+ and CI now builds the emitted image, boots it against real Postgres and asks it
55
+ a question over MCP, with no hosting vendor involved.
56
+
57
+ Verified live before shipping, and the verification paid for itself: a
58
+ project-level `trailingSlash: true` — harmless while the config was static-only
59
+ — 308-redirected every door route including `POST /mcp`. It is removed (the
60
+ site's own Next config already sets it where it belongs); shipping it would have
61
+ broken the MCP endpoint of every adopter who deployed.
62
+
63
+ Two new documents: `docs/deploying.md` (both surfaces onto a host, the
64
+ configuration each needs, and what a cold start costs — measured) and
65
+ `docs/ingesting.md` (why serving does not publish, so a first deploy with no
66
+ ingest serves an empty record; where ingest belongs, which is never inside the
67
+ container; and how the abstention gate gets turned on).
68
+
69
+ Also drops the scaffold's build-script denials for `@google/genai` and
70
+ `protobufjs`. The embedding provider speaks the vendor's REST API directly now,
71
+ so neither package is installed at all and the entries described a dependency
72
+ that no longer exists.
73
+
3
74
  ## 0.0.22
4
75
 
5
76
  ### Patch Changes