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
67 changes: 67 additions & 0 deletions .github/workflows/release-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release candidate audit

on:
pull_request:
paths:
- CHANGELOG.md
- package.json
- pnpm-lock.yaml
- .github/workflows/release-audit.yml
push:
branches: [main]
paths:
- CHANGELOG.md
- package.json
- pnpm-lock.yaml
- .github/workflows/release-audit.yml
workflow_dispatch:

permissions:
contents: read

jobs:
audit:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24.22.3
package-manager-cache: false
- name: Check public registry version
run: |
set -euo pipefail
git rev-parse HEAD
version="$(node -p 'require("./package.json").version')"
status="$(curl --silent --show-error --max-time 30 --retry 2 \
--output "$RUNNER_TEMP/preceptor-packument.json" --write-out '%{http_code}' \
--header 'Accept: application/vnd.npm.install-v1+json' \
'https://registry.npmjs.org/@0xbuff%2fpreceptor')"
echo "Public registry HTTP status: $status"
case "$status" in
404)
echo "No publicly visible package metadata. Scope ownership and staged/private versions need authenticated owner verification."
;;
200)
jq -e '.name == "@0xbuff/preceptor" and (.versions | type == "object")' "$RUNNER_TEMP/preceptor-packument.json" >/dev/null
if jq -e --arg v "$version" '.versions | has($v)' "$RUNNER_TEMP/preceptor-packument.json" >/dev/null; then
echo "::error::Candidate version $version is already public"
exit 1
fi
echo "Candidate version $version is not present in the public version list."
;;
*)
echo "::error::Registry status is inconclusive"
exit 1
;;
esac
- name: Audit locked development dependencies
if: always()
run: |
set -euo pipefail
pnpm audit --json --registry=https://registry.npmjs.org/
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Notable changes to Preceptor are recorded here. The format follows [Keep a Chang

## [Unreleased]

## [0.0.1] - 2026-11-29

### Added

- Deterministic model-free instructional policy with five modes, fixed teaching prompts and default-deny capability filtering.
Expand All @@ -12,5 +14,3 @@ Notable changes to Preceptor are recorded here. The format follows [Keep a Chang
- Scoped narrative memory contracts for recall, creation, revision-bound updates and forget proposals, with host-owned consent, replay suppression and lifecycle interfaces.
- Pure projection of authorized committed academic-result summaries, including duplicate delivery, corrections, revocation, conflict withholding and read-only session context.
- Node.js 24+ ESM and TypeScript declarations, Apache-2.0 licensing, zero runtime dependencies, integration examples and independent offline packed-consumer checks.

The first release is planned as `0.0.1`. The release date and version heading will be recorded when the publication candidate is approved.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ The planner works offline without a language model. Applications can supply thei

## Installation

Requires Node.js 24 or later and ESM. The first release, `0.0.1`, is being prepared. Once the version is available on npm:
Requires Node.js 24 or later and ESM. Install the version you intend to use:

```sh
npm install @0xbuff/[email protected]
```

Until then, build and test from source using the development commands below. Pin the version you have tested.
If the version is not available on npm, build and test from source using the development commands below. Pin the version you have tested.

## Quick start

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Report vulnerabilities involving unauthorized tool execution, assessment-lock by

## Supported versions

The first public npm release is being prepared. Reports against the current repository are welcome. After publication, maintainers prioritize the latest release; no fixed response time, backport schedule or bug bounty is promised.
Maintainers prioritize reports against the latest release and the current repository. No fixed response time, backport schedule or bug bounty is promised.

## Reporting a vulnerability

Expand Down
8 changes: 4 additions & 4 deletions docs/releasing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Releasing Preceptor

Preceptor is preparing its first npm release as `@0xbuff/preceptor@0.0.1` under Apache-2.0. The package uses Semantic Versioning; consumers should pin versions before 1.0.0. A publishable manifest and public repository do not mean a package has been published.
Preceptor uses the npm package name `@0xbuff/preceptor` and the Apache-2.0 license. The package uses Semantic Versioning; consumers should pin versions before 1.0.0. A publishable manifest and public repository do not mean a package has been published.

## Verify the candidate

Expand All @@ -25,7 +25,7 @@ Source maps, private records, provider SDKs and runtime dependencies are exclude

## Approve publication

Before staging, confirm npm scope ownership, name/version availability, publisher identity, contributor rights, notices and dependency audit results. Review the exact current main commit, CI, artifact and its SHA-256. Approve the release date and move the Unreleased changelog entries into a dated `0.0.1` section. Rebuild and reverify if the changelog or any other packed file changes.
Before staging, confirm npm scope ownership, name/version availability, publisher identity, contributor rights, notices and dependency audit results. The read-only `Release candidate audit` workflow checks the locked development dependency graph and the public registry's package/version metadata. Run it for the candidate commit and review the results. An unauthenticated 404 does not establish permission to create a scoped package; verify that in the npm account. Review the exact current main commit, CI, artifact and its SHA-256. Approve the release date and move the Unreleased changelog entries into a dated `0.0.1` section. Rebuild and reverify if the changelog or any other packed file changes.

The [source-rights record](source-rights.md) documents the initial implementation approval. Each release needs explicit approval for the exact candidate and for publication. Do not create a version tag or GitHub release without authorization.

Expand All @@ -35,8 +35,8 @@ The manual `Stage npm package` workflow runs on `main` in the `npm-stage` enviro

1. Configure GitHub Settings > Environments > `npm-stage` to restrict deployments to main, require reviewers and disallow administrator bypass. Prevent self-review where a separate reviewer is available.
2. After approval, set environment variables `PRECEPTOR_STAGE_COMMIT`, `PRECEPTOR_STAGE_RUN_ID` and `PRECEPTOR_STAGE_SHA256` to the approved current main commit, successful main quality run ID and actual tarball digest. Leave them unset before approval.
3. Configure [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) for `0xbuffdev/preceptor`, workflow `release.yml`, environment `npm-stage`, with staging-only permission. Disable direct publish and dist-tag changes. Use GitHub-hosted runners. Verify registry setup and current npm requirements before dispatch. Do not add a long-lived publishing token to quality CI.
4. Dispatch the workflow with the approved run ID and approve the protected environment job. Inspect the staged version and its tarball digest. Use npm's required human approval and authentication only after separate publication authorization.
3. Configure [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/) for `0xbuffdev/preceptor`, workflow `release.yml`, environment `npm-stage`, with staging-only permission. Disable direct publish and dist-tag changes. Use GitHub-hosted runners. Configure the publisher close to use; an unvalidated configuration expires after two days. Verify registry setup and current npm requirements before dispatch. Do not add a long-lived publishing token to quality CI.
4. If this is a new package without npm settings, follow npm's [first-package staged creation procedure](https://github.blog/changelog/2026-10-02-npm-staged-publishing-now-supports-creating-new-packages/). Creating a package by staging requires separate authorization and an authenticated owner of the scope. Confirm the available provenance and approved archive before choosing the bootstrap route; never directly publish a placeholder to enable trusted publishing. Once an eligible trusted publisher is configured, dispatch the workflow with the approved run ID and approve the protected environment job. Inspect the staged version and its tarball digest. Use npm's required human approval and authentication only after separate publication authorization.
5. Clear the approval variables when finished.

## After publication
Expand Down
Loading