Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ tests. The approved scope is the [Support Desk enhancement plan](https://github.
optional `@pegma/knowledge-base-mcp` package for the shared five-operation
dispatcher, versioned HTTP contract, and MCP transport. Live host interfaces
remain host work; do not create later packages early.
- KB-04 source is merged. KB-05 source preparation adds local D1 conformance,
a public synthetic composition, and exact-artifact release tooling. All four
- [KB-04 source](https://github.com/pegma-dev/knowledge-base/pull/5) and
the separate KB-05 [partial source](https://github.com/pegma-dev/knowledge-base/pull/4)
and [release-preparation source](https://github.com/pegma-dev/knowledge-base/pull/6)
slices are merged. The partial slice adds local D1 conformance and a public
synthetic composition; the release slice adds exact-artifact tooling. All four
packages remain unpublished at synchronized version `0.1.0`; source readiness
does not complete first publication, registry verification, or host acceptance.
- Never implement a database, authorization role model, identity/session/token
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ Hosts own their users, storage, authorization policy, interfaces, and deployment
Knowledge Base owns collection policy, immutable article revisions, validation,
and exact publication approval. It requires no GitHub connection or AI provider.

> Development status: KB-01 through KB-03 provide contracts, pure domain
> Development status as of 2026-11-07: KB-01 through KB-03 provide contracts, pure domain
> transitions, authorized application/persistence, and bounded retrieval/repair.
> [Merged KB-04 source](https://github.com/pegma-dev/knowledge-base/pull/5) adds
> the optional five-operation HTTP/MCP adapter and authenticated protocol proof.
> KB-05 source preparation supplies local D1 conformance, a public synthetic
> example, and exact-artifact release tooling. All four packages are unpublished
> The separate [partial KB-05 source](https://github.com/pegma-dev/knowledge-base/pull/4)
> supplies local D1 conformance and a public synthetic example; the later
> [release-preparation source](https://github.com/pegma-dev/knowledge-base/pull/6)
> supplies exact-artifact tooling. Both are merged. All four packages are unpublished
> at `0.1.0`. First publication, trusted-publisher setup, registry verification,
> and actual two-host existing-login/client acceptance remain separate gates.
> This repository is not an operational hosted KB or a production dependency.
Expand Down Expand Up @@ -47,7 +49,9 @@ Read the [agent API](docs/AGENT_API.md) for the exact contract and
Hosts compose the separate [Agent Access](https://github.com/pegma-dev/agent-access)
producer with their existing human login and current Admin consent. AUTH-01's
[merged source](https://github.com/pegma-dev/agent-access/pull/1) supplies the
source prerequisite; publication remains separate. Initial authoring grants are
source prerequisite, and its
[release preparation](https://github.com/pegma-dev/agent-access/pull/2) is merged.
Agent Access remains unpublished at `0.1.0`. Initial authoring grants are
app-instance-wide. Collection-specific delegation is a future host seam.
The KB does not issue credentials or implement login, roles, or a limiter.

Expand All @@ -74,7 +78,9 @@ demonstrates author/test/review/publish/retrieve with fictional trust inputs.
The separate `agent:proof` gate composes reviewed pinned AUTH-01 source and all
four packed KB artifacts in a temporary consumer with the official MCP SDK
`1.32.2`, exercising OAuth, the five tools, evidence binding, and HTTP/MCP parity.
Current-head results establish execution; these proofs establish neither actual
The [historical source-gate record](docs/SOURCE_PREPARATION.md#historical-source-gates)
retains reviewed heads and CI links. Current-head results establish execution;
these proofs establish neither actual
requested-client compatibility nor either real host's login/staging acceptance.

Develop on Node 22.6.0+ or 24 with pnpm 10.34.5:
Expand Down
24 changes: 13 additions & 11 deletions docs/AGENT_WORKFLOW.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Agent authoring and test-evidence workflow

KB-04 adds optional authoring transports over the existing Knowledge Base
application. Source work remains in progress until current-head gates and
review pass. All four KB packages are unpublished at `0.1.0`; this document
The [merged KB-04 source](https://github.com/pegma-dev/knowledge-base/pull/5)
adds optional authoring transports over the existing Knowledge Base
application. [KB-05 release-preparation source](https://github.com/pegma-dev/knowledge-base/pull/6)
is also merged. All four KB packages are unpublished at `0.1.0`; this document
describes the composition and retained acceptance contract, not a live service
or a client-compatibility claim. The exact wire contract is in
[AGENT_API.md](AGENT_API.md).
Expand Down Expand Up @@ -105,14 +106,15 @@ temporary test consumer, and installs all four KB tarballs with the official
MCP SDK `1.32.2`. It exercises OAuth and real SDK protocol calls through the
five-operation loop, host-attested evidence, HTTP/MCP parity, and rejection
cases. The fictional human session, staging run, and attester remain test
inputs. Current-head gate output establishes execution; this document records
no pass verdict.

KB-04 source exit requires format, type, tests, synthetic example, artifact
checks, and `agent:proof` on Node 22 and 24, plus a clean current-head OpenRouter
review with zero actionable findings and the applicable security checks. It
closes only the source slice. KB-05 owns reviewed publication of the four KB
packages; Agent Access follows its separate first-publication and
inputs. The historical reviewed-head gate results and exact CI links are
recorded in [source preparation](SOURCE_PREPARATION.md#historical-source-gates);
changed source requires fresh
current-head gates.

The merged KB-04 source exit closes only its source slice. KB-05 release-preparation
source is merged; full KB-05 publication remains open. Agent Access's
[release-preparation source](https://github.com/pegma-dev/agent-access/pull/2)
is also merged and follows its separate first-publication and
trusted-publisher process. Both public releases precede production host
assembly. Branches, copied source, local paths, and unpublished production
tarballs cannot substitute for them.
Expand Down
6 changes: 4 additions & 2 deletions docs/COLLECTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ document alone does not mark a task complete. The authoritative collection is
`knowledge-base.records.v1`.
The approved scope is the
[implementation plan](https://github.com/pegma-dev/support-desk/blob/main/docs/KNOWLEDGE_AI_PLAN.md)
and its P-00 capacity/privacy requirements. MCP, real-host acceptance, and
production readiness remain later gates.
and its P-00 capacity/privacy requirements. KB-04's optional HTTP/MCP adapter
source is [merged](https://github.com/pegma-dev/knowledge-base/pull/5). Package
publication, real-host acceptance, and production readiness remain separate
gates.

## Partition and authority rules

Expand Down
17 changes: 11 additions & 6 deletions docs/HOST_COMPOSITION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@
## Status and ownership

This documents the KB-02/KB-03 application and KB-04 transport host boundaries.
KB-04 source is in progress until current-head gates and review pass; neither
real host is ready on that evidence alone. The unpublished application composes
contracts/core with host-supplied Storage Core and Authorization Core. The
[KB-04 source](https://github.com/pegma-dev/knowledge-base/pull/5) and
[KB-05 release preparation](https://github.com/pegma-dev/knowledge-base/pull/6)
are merged; neither real host is ready on that evidence alone. The unpublished
application composes contracts/core with host-supplied Storage Core and
Authorization Core. The
optional `@pegma/knowledge-base-mcp` package supplies bounded HTTP/MCP adapters
over that application. All four KB packages are unpublished at `0.1.0`.
No package becomes an identity system or an operational hosted endpoint.
See [declared collections](COLLECTIONS.md) for the required
layout, CAS, admission, and replay design.

Independent partial KB-05 [source preparation](SOURCE_PREPARATION.md) adds
The earlier merged [partial KB-05 source](https://github.com/pegma-dev/knowledge-base/pull/4),
documented in [source preparation](SOURCE_PREPARATION.md), adds
shared memory/Azurite/local-D1 conformance and a
[public synthetic composition](../examples/composition/README.md). The D1
fixture passes a real Miniflare binding directly to the released
Expand All @@ -24,8 +27,10 @@ AUTH-01's [merged public source](https://github.com/pegma-dev/agent-access/pull/
provides KB-04's credential producer prerequisite. The separate `agent:proof`
gate uses that reviewed pinned source only in a temporary consumer with the
four KB tarballs and official SDK `1.32.2`. It tests the synthetic OAuth and
draft/evidence transport loop. Actual existing-login/client acceptance on both
hosts, Agent Access publication, and full KB-05 publication remain separate.
draft/evidence transport loop. Agent Access's
[release-preparation source](https://github.com/pegma-dev/agent-access/pull/2)
is also merged. Actual existing-login/client acceptance on both hosts, Agent
Access publication, and full KB-05 publication remain separate.

The host owns identity verification, scoped local-agent credentials, current
authorization resolution, browser/transport protections, store construction,
Expand Down
21 changes: 14 additions & 7 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,27 @@ The release set is exactly these packages, in dependency order:
3. `@pegma/knowledge-base-application`
4. `@pegma/knowledge-base-mcp`

All four have synchronized source version `0.1.0` and remain unpublished.
[KB-04 source](https://github.com/pegma-dev/knowledge-base/pull/5) is merged at
`b61fc77aedd22e888ac7292c3597f93e54fcda8e`; its Node 22/24 lanes passed 372 tests
each and the official-SDK authenticated synthetic protocol proof. KB-05's source
candidate supplies local D1 conformance, public synthetic composition, and the
release tooling.
As of **2026-11-07**, all four have synchronized source version `0.1.0` and
remain unpublished. [KB-04 source](https://github.com/pegma-dev/knowledge-base/pull/5)
and [KB-05 release preparation](https://github.com/pegma-dev/knowledge-base/pull/6)
are merged. The separate earlier [partial KB-05 source slice](https://github.com/pegma-dev/knowledge-base/pull/4)
supplied local D1 conformance and public synthetic composition; PR #6 added
release tooling. The canonical [historical source-gate record](SOURCE_PREPARATION.md#historical-source-gates)
identifies reviewed heads separately from merge commits and retains exact
CI links, counts, review, and security receipts. Full KB-05 publication remains
open.
Changed source still needs all current-head gates before release preparation.
No source merge configures publishers, creates a tag/release, or publishes npm
packages. Follow the [maintainer bootstrap handoff](BOOTSTRAP.md) for first use.

[Agent Access](https://github.com/pegma-dev/agent-access/pull/1) is a separate
release. Its reviewed commit `a444e2113db98455b638b2ef8aa7c2faccb16b62` is built
only in `agent:proof`'s isolated test consumer with the four KB tarballs and
official MCP SDK `1.32.2`. Its merged 123-test source result does not publish it.
official MCP SDK `1.32.2`. Its separate
[release-preparation source](https://github.com/pegma-dev/agent-access/pull/2)
is also merged; [source preparation](SOURCE_PREPARATION.md) records its
reviewed-head CI and merge identity. It remains unpublished at `0.1.0`; that release-only merge
does not replace the protocol fixture's original implementation pin.
Production hosts require exact published versions of both components.

## Repository and development artifact gates
Expand Down
14 changes: 9 additions & 5 deletions docs/RETRIEVAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ repository gates remain required.
KB-03 extends the existing application package; it creates no new package,
database, model integration, or authentication system. All packages remain
unpublished at source version `0.1.0`. Source tests and repository gates, not
this document, determine completion. API/MCP, real-host acceptance, and
production activation remain later tasks.
this document, determine completion. KB-04's optional HTTP/MCP adapter source
is [merged](https://github.com/pegma-dev/knowledge-base/pull/5). Package
publication, real-host acceptance, and production activation remain separate
tasks.

Read [declared collections](COLLECTIONS.md) for the authoritative record
layout and [host composition](HOST_COMPOSITION.md) for trusted access,
Expand Down Expand Up @@ -232,9 +234,11 @@ draft exclusion, stale index/cache and policy/proof/source revocation,
applicability mismatches, safe titles/snippets/counts/errors, whole-source
budgets, and instrumented physical read/page ceilings. Maintenance tests cover
duplicate/out-of-order jobs, partial failure, bounded resumable scans,
capacity admission, retirement/move cleanup, and repair convergence. Memory
and real-Azurite evidence are source gates; D1 consumer conformance and real
host workflows retain their later release/activation gates.
capacity admission, retirement/move cleanup, and repair convergence. These
public-entry suites run against memory, real Azurite, and real local Miniflare
D1 in the earlier merged [partial KB-05 source slice](SOURCE_PREPARATION.md).
Released-consumer
verification and real host workflows retain their release/activation gates.

The executable source cases live in [retrieval tests](../tests/retrieval.test.ts)
and [physical-bound tests](../tests/retrieval-bounds.test.ts), using
Expand Down
Loading
Loading