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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ signatures, source-bound provenance, and a clean exact-version consumer with
scripts disabled. Manual workflow dispatch prepares only.

See [release operations](docs/RELEASING.md) and the
[first-publication handoff](docs/BOOTSTRAP.md). The source is the `0.1.1`
candidate for the first advertised trusted release. Maintainer 2FA bootstrap of
[first-publication handoff](docs/BOOTSTRAP.md). The source is the `0.2.0`
release candidate; `0.1.1` is published as npm `latest` with tag `v0.1.1`. Maintainer 2FA bootstrap of
`0.1.0` is complete with exact registry bytes confirmed; it supplies no OIDC
provenance. Verify actual npm distribution tags after bootstrap and investigate
unexpected defaults; the publish tag argument alone does not prove their state.
Expand Down
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog

## 0.2.0

- Add `listGrants(browserContext, { ownerPrincipal, cursor?, limit?, statuses? })` for
owner-scoped grant discovery. Pages return safe grant views, default to 20
entries, allow at most 100 entries, and use owner-bound opaque cursors. Each
call rechecks the trusted browser session and current owner authority. The optional
`statuses` filter accepts `pending`, `active`, `revoked`, and `expired`; filtering
can return fewer items than the page limit while a continuation cursor remains.
- Maintain the new `agent-access.owner-index.v1` Storage Core collection during
approval. The owner index uses a separate partition from each grant; listing
re-reads authoritative grant heads and claims no cross-partition atomicity.
- Add the bounded, idempotent `backfillGrantIndex({ cursor, limit })` maintenance
API to index approved grants created before 0.2.0. Each call scans at most
`limit` physical grant rows (default 100, maximum 1000).
- Add opt-in `multipart: { maxBytes }` mode to
`createProtectedResourceAuthenticator`. `maxBytes` defaults to 1 MiB
(1048576 bytes) and must be a positive integer no greater than 16 MiB
(16777216 bytes). Bearers remain header-only; credential fields in parts are
rejected, parsed form data is returned as `result.form`, and authorization is
rechecked after parsing.

### Host upgrade

Before deploying, provision `agent-access.owner-index.v1` with the same
read/write/transaction rights as `agent-access.records.v1` if the host explicitly
provisions collections, tables, or roles. Run `backfillGrantIndex` once to
completion for each configured issuer/resource: pass each returned `nextCursor`
to the next call until it is null. Run this through host maintenance, never an
agent-facing route. Existing grants remain usable and revocable by ID before
backfill, but do not appear in owner listings until indexed. Hosts that prune
index entries also need recurring backfill as described in [the API
guide](docs/API.md#owner-grant-listing).

Multipart remains off by default. Enable it explicitly only on authenticators
that accept uploads and select an appropriate body limit; omitting `maxBytes`
within the option uses the 1 MiB default.

## 0.1.1

- Published package baseline preceding the owner-listing and opt-in multipart
additions in 0.2.0.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ reading, draft writing, and test-evidence submission. Future capabilities
require explicit registration and fresh consent; changing the registry cannot
silently widen an existing grant.

As of 2026-11-07, the source is the `@pegma/agent-access@0.1.1` candidate for
the first advertised trusted release. Maintainer 2FA bootstrap of all five
The source is the `@pegma/agent-access@0.2.0` release candidate.
`@pegma/agent-access@0.1.1` is already published as npm `latest`, and its
`v0.1.1` tag exists; this does not establish provenance for the new candidate.
Maintainer 2FA bootstrap of all five
`0.1.0` packages, the four Knowledge Base packages and Agent Access, is complete
with exact registry bytes confirmed and no OIDC provenance. The
[bootstrap receipt](docs/BOOTSTRAP.md#bootstrap-receipt-2026-11-07) records the
Expand All @@ -41,7 +43,9 @@ paginated `listGrants` ([owner grant listing](docs/API.md#owner-grant-listing))
and can opt individual protected-resource authenticators in to bounded
multipart uploads with header-only bearer credentials
([opt-in multipart uploads](docs/HTTP.md#opt-in-multipart-uploads)). Both are
unreleased source additions and change no package version.
additions in the `0.2.0` candidate. Hosts upgrading grants created before 0.2.0 must run
the bounded `backfillGrantIndex` maintenance call as a one-time upgrade step; multipart remains off by default.
See the [changelog](CHANGELOG.md) for the upgrade notes.

Read the [architecture](docs/ARCHITECTURE.md), [API](docs/API.md), and
[HTTP composition](docs/HTTP.md) before wiring a host. The
Expand All @@ -50,13 +54,13 @@ Read the [architecture](docs/ARCHITECTURE.md), [API](docs/API.md), and
and later trusted-publisher path. The [maintainer bootstrap handoff](docs/BOOTSTRAP.md)
records the initial 2FA publication under the requested `bootstrap` tag. Operators
must verify actual distribution tags and investigate unexpected defaults.
The `0.1.1` candidate still needs fresh gates and review, verified publisher
The `0.2.0` candidate still needs fresh gates and review, verified publisher
configuration, an approved signed tag and release, and successful exact registry
consumer and trusted-provenance verification. Release preparation preserves
exact tarball bytes, an independently retained manifest digest, and the
verified signed-tag identity. External protection, signer, environment, and
trusted-publisher/direct-publish configuration remain maintainer gates.
Knowledge Base's advertised release waits for verified Agent Access `0.1.1`.
Knowledge Base's advertised release waits for verified Agent Access `0.2.0`.
SD-02 requires verified advertised Knowledge Base dependencies; real host
assembly requires verified advertised dependencies from both components. Merged source
and release preparation authorize no tags, releases, publication,
Expand Down
3 changes: 2 additions & 1 deletion docs/API.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Public API and host boundary

The source package is not yet published. It composes the released
Use an exact registry version after its release has been verified as described in
[release operations](RELEASING.md). The package composes the released
`@pegma/authorization-core` AccessContext, `@pegma/spine` Clock/PrincipalId/
IsoTimestamp, `@pegma/storage-core` Store, and transactional `@pegma/audit`.
The host keeps its existing login, session, administrator policy, browser
Expand Down
42 changes: 33 additions & 9 deletions docs/BOOTSTRAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,41 @@

The maintainer owns npm publication and external configuration. As of
2026-11-07, `@pegma/agent-access@0.1.0` has completed maintainer 2FA bootstrap
with exact registry bytes confirmed and no OIDC provenance. Source version
`0.1.1` is the candidate for the first advertised trusted release; that release
is not yet verified. Knowledge Base has its own release handoff and waits for
verified Agent Access `0.1.1` before its advertised release.
with exact registry bytes confirmed and no OIDC provenance. Version `0.1.1`
is already published as npm `latest`, and its `v0.1.1` tag exists. Source version
`0.2.0` is the new release candidate; its release is not yet verified.
Knowledge Base has its own release handoff and waits for
verified Agent Access `0.2.0` before its advertised release.

Creating the package name and advertising the first trusted release are
separate steps. Maintainer 2FA publication supplies no OIDC provenance and
cannot substitute for strict `verify` in [release operations](RELEASING.md).
The historical AUTH-01 source result does not replace this change's required
current-head code/security review and Node 22/24 gate.

## Observed 0.1.1 publication pointers: 2026-11-10

Read-only checks on 2026-11-10 found the existing
[0.1.1 GitHub release](https://github.com/pegma-dev/agent-access/releases/tag/v0.1.1)
and its linked [Publish run](https://github.com/pegma-dev/agent-access/actions/runs/42420302775).
GitHub reports that release-triggered run completed successfully, including
signed-identity validation, both Node release gates, preparation, exact-artifact
publication, and the separate registry-release/consumer verification job.
The npm registry reports version `0.1.1`, with `latest=0.1.1` and
`bootstrap=0.1.0`. Recheck mutable distribution tags before relying on them:

```sh
npm view @pegma/agent-access@0.1.1 version dist-tags --json --registry https://registry.npmjs.org
gh api repos/pegma-dev/agent-access/releases/tags/v0.1.1
gh api repos/pegma-dev/agent-access/actions/runs/42420302775
gh api repos/pegma-dev/agent-access/actions/runs/42420302775/jobs
```

These are pointers to observed public metadata, not a reconstructed publication
receipt. This repository does not retain a 0.1.1 artifact ID or independently
recorded manifest digest here; this check did not download or re-verify registry
bytes, signatures, or provenance. It supplies no release evidence for 0.2.0.

## Bootstrap receipt: 2026-11-07

The operator manually reran the post-publication preflight commands below at
Expand Down Expand Up @@ -79,7 +103,7 @@ requested publish tag alone does not establish actual distribution-tag state.

The following procedure records the completed first publication. Do not
recreate or move its tag, rebuild its artifact, or republish the immutable
version. Use the separate trusted-release procedure for the `0.1.1` candidate.
version. Use the separate trusted-release procedure for the `0.2.0` candidate.

1. Confirm npm ownership and publishing permission for `@pegma/agent-access`.
Record the responsible maintainer and keep credentials and one-time codes
Expand Down Expand Up @@ -141,7 +165,7 @@ before advertisement. Do not infer actual tag state from `--tag bootstrap`.
Do not advertise `0.1.0` as the trusted production dependency or authorize host
installation from it.

## First advertised trusted release
## Next trusted release

Once the name exists, the maintainer configures its trusted publisher, the
protected `npm-publish` environment, approved signers, and immutable tag
Expand All @@ -150,8 +174,8 @@ to `pegma-dev/agent-access`, exact workflow `publish.yml`, and environment
`npm-publish`; explicitly permit direct publishing. Check npm's first-use
timing before configuring it for the reviewed trusted release.

The `0.1.1` candidate proposes the package-version change for the first
advertised release; dependent pins must be synchronized across consumers.
The `0.2.0` candidate adds owner-scoped grant listing, the owner index, and
opt-in multipart bearer transport; dependent pins must be synchronized across consumers.
It still requires fresh current-head code/security review and the full Node
22/24 gate. A manually published version cannot be republished through OIDC to
acquire provenance. After the candidate's gates pass and external publisher
Expand All @@ -166,6 +190,6 @@ job succeeds: registry bytes/dependencies, a clean exact-version registry
consumer, registry signatures, and matching source/workflow/tag/commit
provenance. Preserve that result with the release identity and independent
manifest digest. Knowledge Base's advertised release follows verified Agent
Access `0.1.1`. Both hosts additionally require verified advertised Knowledge Base
Access `0.2.0`. Both hosts additionally require verified advertised Knowledge Base
and their retained actual login/Admin-consent/client/staging acceptance before
activation. Registry publication closes none of those host gates.
12 changes: 7 additions & 5 deletions docs/PROJECT_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ AUTH-01 is the scoped-credential prerequisite inserted before KB-04 in the
[Knowledge/AI plan](https://github.com/pegma-dev/support-desk/blob/main/docs/KNOWLEDGE_AI_PLAN.md).
This repository owns reusable authorization-server source; Knowledge Base
continues to own content and resource operations. The current source is the
`@pegma/agent-access@0.1.1` candidate for the first advertised trusted release.
`@pegma/agent-access@0.2.0` release candidate. Version `0.1.1` is already
published as npm `latest`, and its `v0.1.1` tag exists. The additive owner-scoped
grant API, owner index, and opt-in multipart transport require the new minor version.
AUTH-01 source and the original release preparation are merged. As of
2026-11-07, maintainer 2FA bootstrap of all five `0.1.0` packages, the four
Knowledge Base packages and Agent Access, is complete with exact registry bytes
Expand Down Expand Up @@ -33,7 +35,7 @@ distinct from the recorded squash merge commits. They are not fixed test-count
requirements or publication guards. The
[2026-11-07 bootstrap receipt](BOOTSTRAP.md#bootstrap-receipt-2026-11-07)
records completion of all five `0.1.0` uploads and exact-byte confirmation,
without OIDC provenance. The `0.1.1` candidate still needs fresh current-head
without OIDC provenance. The `0.2.0` candidate still needs fresh current-head
review, validation, publisher configuration, a signed tag and release, and
strict registry/provenance verification in [release operations](RELEASING.md).

Expand All @@ -44,7 +46,7 @@ strict registry/provenance verification in [release operations](RELEASING.md).
| KB-04 transport source exit | Reviewed head [c897626](https://github.com/pegma-dev/knowledge-base/commit/c897626de6c7b2ea574f4154b0bc7a7731ee106e); [primary Node 22/24 CI](https://github.com/pegma-dev/knowledge-base/actions/runs/42390433045). 372 runtime tests and official SDK proof of all five initial tools. | Merged via [Knowledge Base #5](https://github.com/pegma-dev/knowledge-base/pull/5) as [b61fc77](https://github.com/pegma-dev/knowledge-base/commit/b61fc77aedd22e888ac7292c3597f93e54fcda8e); retained host acceptance open. |
| KB-05 release preparation | Reviewed head [c8ef14a](https://github.com/pegma-dev/knowledge-base/commit/c8ef14af0ec32e3903b9399543b7a9f2e48df2f9); [primary Node 22/24 CI](https://github.com/pegma-dev/knowledge-base/actions/runs/42398508042). Each lane passed 372 runtime tests plus 128 release regressions (500 per lane), with zero skips. Packaging checks cover four KB packages; the packed protocol proof uses all five packages (four KB plus Agent Access). | Merged via [Knowledge Base #6](https://github.com/pegma-dev/knowledge-base/pull/6) as [7f5eee6](https://github.com/pegma-dev/knowledge-base/commit/7f5eee68be692b5489de3965f3f5ede7ef7a812d); historical release-preparation source. |
| First-publication bootstrap | Maintainer 2FA uploads of all five `0.1.0` packages (four KB plus Agent Access) were accepted; exact registry bytes match the prepared artifacts. See the [bootstrap receipt](BOOTSTRAP.md#bootstrap-receipt-2026-11-07). | Complete; OIDC provenance absent. Operators must verify distribution tags and investigate unexpected defaults. |
| First advertised publication | Agent Access `0.1.1` requires [full current-head Node 22/24 CI and code/security review](RELEASING.md#repository-and-development-artifact-gates), the [external release checklist](RELEASING.md#external-release-checklist), an approved signed tag and release, and [strict exact-version registry/provenance verification](RELEASING.md#registry-verification-and-availability). | Pending. Knowledge Base advertisement waits for verified Agent Access `0.1.1`. |
| Next trusted publication | Agent Access `0.2.0` requires [full current-head Node 22/24 CI and code/security review](RELEASING.md#repository-and-development-artifact-gates), the [external release checklist](RELEASING.md#external-release-checklist), an approved signed tag and release, and [strict exact-version registry/provenance verification](RELEASING.md#registry-verification-and-availability). | Pending. Knowledge Base advertisement waits for verified Agent Access `0.2.0`. |
| SD-02 AI coordinator | Requires verified advertised Knowledge Base dependencies. | Pending. |
| Retained host acceptance | PG-01/RG-01 require exact verified advertised Agent Access and Knowledge Base dependencies, real existing-login/current-Admin consent, and actual per-client protected API/MCP, credential-failure, and exact-revision evidence-attestation proof on both hosts. | Pending; required before activation/A-01/pilots. |

Expand Down Expand Up @@ -78,9 +80,9 @@ clients or unsupported flows remain explicit host acceptance gaps.

The source prerequisites, original release preparation, and `0.1.0` bootstrap
are complete. The remaining sequence is fresh review and gates for Agent Access
`0.1.1`, verified external publisher configuration, its approved signed tag and
`0.2.0`, verified external publisher configuration, its approved signed tag and
release, and strict registry/provenance verification before advertisement.
Knowledge Base's advertised release waits for verified Agent Access `0.1.1`.
Knowledge Base's advertised release waits for verified Agent Access `0.2.0`.
SD-02 follows verified advertised Knowledge Base dependencies; PG-01/RG-01 host
assembly follows verified advertised dependencies from both components.
Real existing-login/current-Admin consent and actual-client proof then remain
Expand Down
Loading
Loading