Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
53091ff
Initial commit
vreshch Nov 7, 2026
00d9cad
feat: the extension starting point, seven parts from probe (#1)
vreshch Nov 8, 2026
f1faf33
chore(deps): pin kit 0.5.0, four standards lows (#2)
vreshch Nov 8, 2026
bbe54a4
refactor: clean-code pass over every file an author copies (#3)
vreshch Nov 8, 2026
d087017
refactor: adopt kit 0.5.1 and cli 0.45.0, drop release scripts (#4)
vreshch Nov 8, 2026
b747294
refactor(api): adopt kit 0.6 (ctx.route, generated openapi) (#5)
vreshch Nov 8, 2026
24ad582
fix(docs): keep starting-point prose free of the template id (#6)
vreshch Nov 8, 2026
d517048
fix(release): pin npm to 11.21.2 for the OIDC publish (#7)
vreshch Nov 8, 2026
c724a94
chore(deps): kit 0.7.0 (#8)
vreshch Nov 8, 2026
c846c24
chore(deps): kit 0.8.0, cli 0.48.0 (#9)
vreshch Nov 8, 2026
0f514d4
chore(deps): kit 0.9.0, cli 0.49.0 (#10)
vreshch Nov 8, 2026
7158f5d
chore(deps): kit 0.12.2, cli 0.50.4 for the e2e gate (#12)
vreshch Nov 10, 2026
9df809f
ci(release): publish by trusted publishing only (#11)
vreshch Nov 10, 2026
d7cfa62
docs: make CLAUDE.md match the checker (#13)
vreshch Nov 13, 2026
0b3a2a0
docs: README for humans, CLAUDE.md matches the code (#15)
vreshch Nov 13, 2026
ad40e85
docs: state the git needs of up and build exactly (#16)
vreshch Nov 13, 2026
b0b5fcf
docs: add a Where facts live list to CLAUDE.md (#17)
vreshch Nov 13, 2026
c931a3b
docs: shorten the README, move depth to docs/ (#18)
vreshch Nov 13, 2026
a3743a5
chore(deps-dev): bump the all-dependencies group with 4 updates (#14)
dependabot[bot] Nov 14, 2026
f745302
docs: apply README review notes (#19)
vreshch Nov 14, 2026
82ff35e
feat: move to kit 0.14.0 and /api/template (#20)
vreshch Nov 15, 2026
d59ed64
feat: kit 0.15 (#21)
vreshch Nov 16, 2026
87ab6e7
chore(deps): kit ^0.16 and cli 0.54.0 (#22)
vreshch Nov 16, 2026
a28e87c
feat(app): the app part and the fetch lint rule (S1.2 X3, kit 0.18) (…
vreshch Nov 17, 2026
6d88aba
docs: one README order, both release records, the deployment row (#24)
vreshch Nov 17, 2026
754f79a
chore(deps): kit ^0.18.4, the anonymous HEAD fix (#25)
vreshch Nov 17, 2026
6b589bc
chore: waive cicd-release-artifact in repo-doctor (#26)
vreshch Nov 18, 2026
2bdacfa
chore(deps): cli ^0.64.1 and kit ^0.18.8, the seal fix (#27)
vreshch Nov 18, 2026
162678c
chore(deps): kit ^0.20.0 and cli ^0.66.0, the served parts (J.4.1 D4)…
vreshch Nov 19, 2026
b818526
chore(deps): kit ^0.21.0, engines ^0.21 (#29)
vreshch Nov 20, 2026
0bcc20d
chore(deps-dev): bump the all-dependencies group with 5 updates (#30)
dependabot[bot] Nov 21, 2026
2f12412
build: keep template/ out of lint, format and the image context
vreshch Nov 22, 2026
75ad5b7
feat(template): a merge is the release; repository names the kit
vreshch Nov 22, 2026
af1013b
ci: the Template check runs the template's own CI in template/
vreshch Nov 22, 2026
64a189f
docs: the template lives in template/; dependabot reads it
vreshch Nov 22, 2026
000f8ca
ci: dependabot reads template/ for npm only
vreshch Nov 22, 2026
23320f4
fix(template): private by default, repository that create rewrites
vreshch Nov 22, 2026
e86342f
ci: the Template job refuses a kit repo or directory in package.json
vreshch Nov 22, 2026
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
directories: ['/', '/template']
schedule:
interval: 'weekly'
day: 'friday'
Expand Down
192 changes: 191 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
scoped='^(feat|fix|refactor|test|chore|ci|docs|perf|build)\((extension|apphost|logs|widget|identity|shell|app|release|ci|docs|deps)\)!?: .{1,60}$'
scoped='^(feat|fix|refactor|test|chore|ci|docs|perf|build)\((extension|apphost|logs|widget|identity|shell|app|template|release|ci|docs|deps)\)!?: .{1,60}$'
bare='^(ci|docs|chore|build): '
if [ "${#TITLE}" -le 72 ] && { [[ $TITLE =~ $scoped ]] || [[ $TITLE =~ $bare ]]; }; then exit 0; fi
echo "::error::PR title '$TITLE' breaks the commit title rules in CLAUDE.md (type(scope): text, max 72)"; exit 1
Expand Down Expand Up @@ -424,3 +424,193 @@ jobs:
if: always()
working-directory: ${{ env.PROBE_DIR }}
run: node node_modules/@agentage/extension/dist/tool/cli.js down || true

# template/ is the start of every new extension, with its own lockfile (not a workspace).
template-changes:
name: Template changes
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
run: ${{ steps.pick.outputs.run }}
candidate: ${{ steps.pick.outputs.candidate }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0

# template/** or this file: the template on its lockfile kit. A kit package it imports: on the candidate kit.
- name: Pick what this change touches
id: pick
env:
BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
set -euo pipefail
files=''
if [ -n "$BASE" ] && git cat-file -e "$BASE^{commit}" 2>/dev/null; then
files=$(git diff --name-only "$BASE" HEAD)
fi
own=false; kit=false
if [ -z "$files" ] || grep -qE '^(template/|\.github/workflows/ci\.yml$)' <<<"$files"; then own=true; fi
if [ -z "$files" ] || grep -qE '^packages/(extension|widget|logs|app)/' <<<"$files"; then kit=true; fi
run=$([ "$own" = true ] || [ "$kit" = true ] && echo true || echo false)
echo "template: $own, kit: $kit" | tee -a "$GITHUB_STEP_SUMMARY"
echo "run=$run" >> "$GITHUB_OUTPUT"
echo "candidate=$kit" >> "$GITHUB_OUTPUT"

template-verify:
name: Template verify and check
needs: template-changes
if: needs.template-changes.outputs.run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CANDIDATE: ${{ needs.template-changes.outputs.candidate }}
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: 'npm'
cache-dependency-path: template/package-lock.json

# The root install goes before the template's: a root node_modules would hide a missing template dependency.
- name: The candidate kit and widget, packed into template/.kit
if: env.CANDIDATE == 'true'
run: |
set -euo pipefail
npm ci --no-audit --no-fund && npm run build
mkdir -p template/.kit
npm pack -w @agentage/extension -w @agentage/widget --pack-destination template/.kit
rm -rf node_modules packages/*/node_modules

- name: Install (the template's own lockfile; the candidate on top when the kit changed)
working-directory: template
run: |
set -euo pipefail
npm ci --no-audit --no-fund
if [ "$CANDIDATE" = true ]; then
npm install --no-audit --no-fund ./.kit/agentage-*.tgz
npm pkg set engines.agentage=">=0.6"
fi

# create rewrites the word template to the id only: a kit repo URL or a directory would break npm provenance.
- name: package.json is private and names no kit repo
working-directory: template
run: jq -e '.private == true and (.repository.url | test("agentage/(platform|kit)") | not) and (.repository.directory == null) and (.bugs.url | test("agentage/(platform|kit)") | not)' package.json

- name: Verify (type-check, lint, format, test with coverage, build)
working-directory: template
run: npm run verify

- name: Conformance (the kit's six rules; the store rule uses the runner's docker)
working-directory: template
run: node_modules/.bin/agentage extension check

template-local:
name: Template up and the e2e gate on local
needs: template-changes
if: needs.template-changes.outputs.run == 'true'
runs-on: ubuntu-latest
# The gate on docker stays under 10 minutes; the candidate build adds about 2.
timeout-minutes: 15
env:
CANDIDATE: ${{ needs.template-changes.outputs.candidate }}
SECRETS_OK: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.fork != true }}
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: 'npm'
cache-dependency-path: template/package-lock.json

- name: The candidate kit and widget, packed into template/.kit
if: env.CANDIDATE == 'true'
run: |
set -euo pipefail
npm ci --no-audit --no-fund && npm run build
mkdir -p template/.kit
npm pack -w @agentage/extension -w @agentage/widget --pack-destination template/.kit
rm -rf node_modules packages/*/node_modules

- name: Install (and Chromium for the widget test; the runner has its OS libraries)
working-directory: template
run: |
set -euo pipefail
npm ci --no-audit --no-fund
if [ "$CANDIDATE" = true ]; then
npm install --no-audit --no-fund ./.kit/agentage-*.tgz
npm pkg set engines.agentage=">=0.6"
fi
npx playwright install chromium

# agentage/e2e is private (the org PAT_TOKEN reads it); Dependabot and fork runs get no secrets.
- name: Checkout agentage/e2e
if: env.SECRETS_OK == 'true'
uses: actions/checkout@v7
with:
repository: agentage/e2e
path: e2e-suite
token: ${{ secrets.PAT_TOKEN }}
persist-credentials: false

- name: Install agentage/e2e (the candidate kit validates when the kit changed)
if: env.SECRETS_OK == 'true'
working-directory: e2e-suite
run: |
set -euo pipefail
npm ci --no-audit --no-fund
if [ "$CANDIDATE" = true ]; then npm install --no-save ../template/.kit/agentage-extension-*.tgz; fi
npx playwright install chromium

# The lockfile cli as in a created repo; on the candidate, the kit's own tool (the cli bundles the released kit).
- name: agentage extension up --docker (the release recipes, store, dev issuer, gateway)
working-directory: template
run: |
if [ "$CANDIDATE" = true ]; then node node_modules/@agentage/extension/dist/tool/cli.js up
else node_modules/.bin/agentage extension up --docker; fi

- name: The widget a11y test through the local gateway (src/**/*.spec.ts)
working-directory: template
run: npm run test:e2e

- name: e2e gate on docker (agentage/e2e, the template row)
if: env.SECRETS_OK == 'true'
working-directory: e2e-suite
run: env "TEMPLATE_DIR=$GITHUB_WORKSPACE/template" npm run e2e -- template gate docker

# A gate that skipped itself is not green.
- name: Assert the gate was not vacuous
if: env.SECRETS_OK == 'true'
working-directory: e2e-suite
env:
MIN_EXECUTED: '25'
run: node scripts/assert-executed.mjs

- name: Logs on failure
if: failure() || cancelled()
working-directory: template
run: docker compose -f .agentage/compose.json logs --no-color --tail 80 || true

# The one context for the template: green when its jobs passed or this change did not touch it.
template:
name: Template
needs: [template-changes, template-verify, template-local]
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Every template job passed or had nothing to test
env:
NEEDS: ${{ toJSON(needs) }}
run: |
set -euo pipefail
jq -r 'to_entries[] | "\(.key): \(.value.result)"' <<<"$NEEDS"
jq -e '.["template-changes"].result == "success" and all(.[]; .result == "success" or .result == "skipped")' <<<"$NEEDS" >/dev/null
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ playwright-report
packages/shell-dashboard/dist-e2e
packages/shell-dashboard/.vendor
packages/shell-dashboard/shots
template
6 changes: 5 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ docker-deploy, security, backend); this file only adds what the tree does not sa
- App kit `@agentage/extension/app` (hooks, `Region`, `Split`, test host): `packages/app/README.md`.
- Dashboard shell (`@agentage/shell-dashboard`, served by `@agentage/apphost`): `packages/shell-dashboard/README.md`.
- Sign in, page token, `mintToken`, `revokeToken`, sign out: `packages/identity/README.md`.
- The extension template: `template/` (its own `CLAUDE.md`, lockfile and CI files); README "The extension template".
- CI jobs: `.github/workflows/ci.yml`. Coverage floor: `vitest.config.ts`. Release rules: `README.md` "Release" (proof: `.github/workflows/release.yml`).

Read the file named here before you read `src/` (`src/` = `packages/extension/src`).
Expand Down Expand Up @@ -49,7 +50,7 @@ Read the file named here before you read `src/` (`src/` = `packages/extension/sr

## Commits

- Scopes: `extension, apphost, logs, widget, identity, shell, app, release, ci, docs, deps`; repo-level `ci`, `docs`, `chore`
- Scopes: `extension, apphost, logs, widget, identity, shell, app, template, release, ci, docs, deps`; repo-level `ci`, `docs`, `chore`
and `build` commits may go scopeless. Titles are conventional commits, 72 characters at most; CI
checks the PR title.
- A release bump commit touches one package, or uses the `release` scope.
Expand Down Expand Up @@ -119,6 +120,9 @@ Read the file named here before you read `src/` (`src/` = `packages/extension/sr

## Gotchas

- `template/` is not a workspace: run `npm ci` and `npm run verify` inside it. Its `.github/` files
never run here; `agentage extension create` copies them once the cli takes `template/`. The
`Template` job runs its CI.
- Screenshot baselines are made in `mcr.microsoft.com/playwright:v1.65.1-noble` (the CI job's
image), never on a host: `npx playwright test -c packages/widget --update-snapshots` inside it.
- Browser code uses `zod/mini` with `import * as z`: full `zod` or a named import puts about
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ npx agentage extension up # runs it on the loca
No part named means all parts. `up` runs the package's `build` script itself, adds the folder to
the daemon on `127.0.0.1:4243` and reloads the extension at each change. `up --docker` runs the
part images on Docker instead; it needs the ports 4280 and 4281 free. The template and its guide are in
[extension-template](https://github.com/agentage/extension-template).
[template/](template). See "The extension template" below.

To work on this repo, you need Node 22+ and npm 10+:

Expand Down Expand Up @@ -188,6 +188,21 @@ npm deprecate <name>@0.0.0-stage "placeholder for the first trusted publish"
npm dist-tag rm <name> bootstrap
```

## The extension template

The folder [template/](template) is the start of every new extension. It came here with its
history from the repo `agentage/extension-template`. It is not an npm workspace: it keeps its own
`package-lock.json` and takes the kit from npm, as a new extension does. The root lint, format, tests,
type-check, build and image context leave it out.

- CI: the `Template` check runs its verify, `agentage extension check`, `up --docker` and the e2e gate
when `template/` or `ci.yml` changes. A change in a kit package it imports runs the same jobs on the
candidate kit and widget.
- Release: `template/.github/workflows/release.yml` never runs here. A repo made by
`agentage extension create` gets it at its root: a merge to master is its release.
- The cli clones the old repo `agentage/extension-template` until a cli release takes this folder.
The old repo stays readable for older cli versions until it is archived.

## License

MIT. See [LICENSE](LICENSE).
Expand Down
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export default [
'packages/shell-dashboard/.vendor/**',
'**/test-results/**',
'**/playwright-report/**',
// The extension template lints with its own config and node_modules (template/eslint.config.mjs).
'template/**',
],
},
{
Expand Down
1 change: 1 addition & 0 deletions packages/apphost/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ packages/shell-dashboard/.vendor
packages/shell-dashboard/shots
packages/widget/src/ds/styles.generated.ts
packages/widget/src/test-support/fixture/dist
template
35 changes: 35 additions & 0 deletions template/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
day: 'friday'
time: '16:07'
timezone: 'Etc/UTC'
assignees:
- 'vreshch'
open-pull-requests-limit: 10
ignore:
# typescript-eslint peer-caps typescript - drop when it supports the next major
- dependency-name: 'typescript'
update-types: ['version-update:semver-major']
groups:
all-dependencies:
patterns:
- '*'

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
day: 'friday'
time: '16:07'
timezone: 'Etc/UTC'
assignees:
- 'vreshch'
open-pull-requests-limit: 5
groups:
all-actions:
patterns:
- '*'
Loading
Loading