@agentage/extension-probe 0.6.2 → 0.7.0

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/README.md CHANGED
@@ -1,83 +1,101 @@
1
1
  # extension-probe
2
2
 
3
- The probe extension: one agentage extension with every part kind, the template every later
4
- extension copies. Each part is only `create(ctx)` (the ui part a `widgets` map); the kit
5
- [`@agentage/extension`](https://github.com/agentage/platform) owns servers, ports, `/health`,
6
- discovery, the envelope, the store connection, the scheduler and the command line. There is no
7
- Dockerfile and no compose file: the kit's tool builds one image per part and runs them locally.
8
-
9
- | Part | Source | Serves |
10
- | ------ | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | pages | [`src/pages`](src/pages/index.ts) | `/`: `probe {version} · {commit}` |
12
- | ui | [`src/ui`](src/ui/index.ts) (`<probe-echo>`, React on `@agentage/widget`) | `/ui/{version}/probe.js`, `harness.html` |
13
- | api | [`src/api`](src/api/index.ts) | `GET /api/v1/echo?msg=` (`probe:read`), `GET /api/v1/ticks?limit=&cursor=`, `POST /api/v1/emit` (`probe:write`; `exit` ends the part cleanly after its 202, the estate restarts it, local `up` does not: run it last), `openapi.json` |
14
- | mcp | [`src/mcp`](src/mcp/index.ts) | `POST /mcp`: `probe__echo` (`probe:read`; [`probe.mcpc.json`](probe.mcpc.json)) |
15
- | worker | [`src/worker`](src/worker/index.ts) | job `tick`, every minute, a row in `ticks` |
16
- | store | [`migrations/`](migrations), [`seeds/`](seeds) | postgres; the api image's `node dist/store/migrate.js` applies them |
17
- | cli | [`src/cli`](src/cli/index.ts) | `agentage ping [msg]` prints `pong` |
18
-
19
- ## Install and run
20
-
21
- Needs Node 22+, npm 10+, Docker, `git` and `jq`. On a clean machine, from nothing:
3
+ The probe is a small agentage extension that has one of every part kind: pages, ui, api, mcp, worker, store and cli. A part does one job. Extension authors use it
4
+ as proof that the shape works. Maintainers test with it. To start your own
5
+ extension, run `npx @agentage/cli@latest extension create <id>` or copy
6
+ [agentage/extension-template](https://github.com/agentage/extension-template).
7
+
8
+ ## Use its command
9
+
10
+ You need the agentage command line, installed globally. You do not need a clone, Docker or a
11
+ sign-in.
12
+
13
+ ```bash
14
+ npm install -g @agentage/cli
15
+ agentage extension install probe # installs @agentage/extension-probe from npm
16
+ agentage ping # prints pong
17
+ ```
18
+
19
+ ## Parts
20
+
21
+ A part is one unit of the extension that does one job. Most are `src/` folders; the store is `migrations/` and `seeds/`. Each part exports only `create(ctx)`.
22
+ The ui part exports a `widgets` map instead. The kit,
23
+ [`@agentage/extension`](https://github.com/agentage/platform), runs each part and builds one image
24
+ each for pages, ui, api, mcp and worker, so this repo has no Dockerfile or compose file.
25
+
26
+ | Part | Serves |
27
+ | ------ | ------------------------------------------------------------------------------------- |
28
+ | pages | `/`: `probe {version} · {commit}` |
29
+ | ui | `/ui/{version}/probe.js`, `harness.html` |
30
+ | api | `GET /api/probe/echo`, `GET /api/probe/ticks`, `POST /api/probe/emit`, `openapi.json` |
31
+ | mcp | `POST /mcp`: tool `probe__echo` |
32
+ | worker | job `tick`, one row in `ticks` per minute |
33
+ | store | postgres |
34
+ | cli | `agentage ping [msg]` |
35
+
36
+ More: [docs/parts.md](docs/parts.md), with what the kit owns.
37
+
38
+ ## Run it from a clone
39
+
40
+ You need Node 22 or newer, npm 10 or newer, Docker and git. Nothing needs a sign-in.
22
41
 
23
42
  ```bash
24
43
  git clone https://github.com/agentage/extension-probe && cd extension-probe
25
- npm ci # the cli comes with it: npx agentage is the lockfile's
26
- npx agentage extension up # last line: ready 7 parts healthy <n> s
27
- echo "http://localhost:4280/ui/$(jq -r .version package.json)/harness.html" # open, click ping: pong hi
44
+ npm ci # installs the cli pinned in the lockfile
45
+ npx agentage extension up --docker # last line: ready 7 parts healthy <n> s
46
+ # open http://localhost:4280/ui/<version>/harness.html (version from package.json), click ping
28
47
  curl -s localhost:4280/.well-known/agentage-extension.json
29
- T=$(npx agentage extension token --scope probe:read) # aga_... from the dev issuer on localhost:4281
30
- curl -s -H "Authorization: Bearer $T" "localhost:4280/api/v1/echo?msg=hi" # {"success":true,"data":{"msg":"hi","caller":"usr_dev"}}
31
- npx agentage extension install . # linked @agentage/extension-probe (working copy)
48
+ T=$(npx agentage extension token --scope probe:read) # from the dev issuer on localhost:4281
49
+ curl -s -H "Authorization: Bearer $T" "localhost:4280/api/probe/echo?msg=hi"
50
+ npx agentage extension install . # linked: the working copy
32
51
  npx agentage ping # pong
33
- npx agentage extension down # removed 8 containers · 1 network · 1 volume
52
+ npx agentage extension down # removes the containers, network and volume
34
53
  ```
35
54
 
36
- A global `agentage` (0.42.0 or later) works the same as `npx agentage`. `up` builds the five part
37
- images from the release recipe, writes `.agentage/record.json` from the local image digests (so
38
- discovery is valid), starts postgres, runs the migrate job, the dev issuer (4281) and a Traefik
39
- gateway (4280) with the URL layout of a deployment, then waits until every part is healthy and
40
- prints `ready 7 parts healthy` and the seconds it took (15 to 35 s once the base images are pulled). Each checkout is
41
- its own compose project, so `down` in one never touches another; a second checkout's `up` is
42
- refused while the first holds 4280. On a kept volume (`down --keep-data`) the store line says
43
- `1 migration already applied · 1 seed already applied`.
55
+ Use `npx agentage` inside the clone. A global `agentage` can be older than the pinned one and lack
56
+ `extension up --docker`.
44
57
 
45
- ## Verify
58
+ `up` reports 7 parts. Five run as containers: pages, ui, api, mcp and worker. `store` is
59
+ postgres. `cli` runs on your machine.
46
60
 
47
- What CI runs, in order, with the counts a green run prints (2026-11-09):
61
+ More: [docs/develop.md](docs/develop.md#run-it-from-a-clone)
48
62
 
49
- ```bash
50
- npm run verify # 23 tests passed, coverage over 70 %
51
- npx agentage extension check # six rules ok, PASS probe 0.6.2 conforms (6 rules)
52
- npx agentage extension up # ready 7 parts healthy <n> s (each /health body asserted)
53
- npx playwright install chromium # once; a bare Linux also needs --with-deps
54
- npm run test:e2e # 11 passed (smoke and the widget tests)
55
- ```
63
+ ## Verify
56
64
 
57
- Then the gate of [agentage/e2e](https://github.com/agentage/e2e) (private: needs read access)
58
- against the same `up`, from a checkout of that repo:
65
+ What CI runs, in order:
59
66
 
60
67
  ```bash
61
- npm ci && npx playwright install --with-deps chromium
62
- PROBE_DIR=/path/to/extension-probe npm run e2e -- probe gate local # 85 passed, 5 skipped
68
+ npm run verify # type-check, lint, format, tests with coverage, build
69
+ npx agentage extension check # six rules; PASS probe <version> conforms
70
+ npx agentage extension up --docker # each part's /health body is asserted
71
+ npx playwright install chromium # once; a bare Linux also needs --with-deps
72
+ npm run test:e2e # smoke and the widget tests
63
73
  ```
64
74
 
65
- `PROBE_DIR` lets the gate read `probe.mcpc.json`, `openapi.json` and the cli part from this
66
- checkout; without it the cli part tests skip. The 5 skipped need a deployed release (the pinned
67
- version, the release commit, the release record twice, the HTTPS redirect). CI fails a gate that
68
- executed fewer than 30 tests or none of the cli part, and the job is bounded at 10 minutes (about 3
69
- today).
70
- Dependabot runs get no secrets, so they skip the agentage/e2e checkout and the gate (`up` and
71
- `npm run test:e2e` still run).
75
+ CI then runs the gate of agentage/e2e against the same `up`. That repository is private, so only
76
+ maintainers run the gate.
77
+
78
+ More: [docs/develop.md](docs/develop.md#verify)
72
79
 
73
80
  ## Release
74
81
 
75
- A `v*` tag equal to the `package.json` version runs `.github/workflows/release.yml`: it builds and
76
- pushes `ghcr.io/agentage/probe-{pages,ui,api,mcp,worker}:{version}`, attaches the build record with
77
- the five digests to the GitHub release as `agentage-extension.json`, and publishes
78
- `@agentage/extension-probe` to npm with provenance. A version's images never change: a re-run keeps
79
- the released images and record and only retries npm, and a tag moved to another commit is refused
80
- (`agentage extension release`); a fix ships as a new version.
82
+ A `v*` tag runs `.github/workflows/release.yml`. It builds and pushes
83
+ `ghcr.io/agentage/probe-{pages,ui,api,mcp,worker}:{version}`. It attaches the build record with the
84
+ five image digests to the GitHub release as `agentage-extension.json`. It publishes
85
+ `@agentage/extension-probe` to npm with provenance.
86
+
87
+ 1. Bump `version` in `package.json`.
88
+ 2. Run `npx agentage extension check --write` and `npm run format`.
89
+ 3. Commit to `master`, then tag `v<version>`. The tag must equal the version.
90
+
91
+ A released version never changes. A re-run keeps its images and record and only retries npm. `agentage extension release`
92
+ refuses a tag moved to another commit. Ship a fix as a new version.
93
+
94
+ ## Documentation
95
+
96
+ - [docs/parts.md](docs/parts.md): each part's routes, scopes and limits.
97
+ - [docs/develop.md](docs/develop.md): what `up` does; the e2e gate.
98
+
99
+ ## License
81
100
 
82
- To release: bump `version` in `package.json`, run `npx agentage extension check --write` and
83
- `npm run format`, commit, tag `v<version>`.
101
+ MIT. See [LICENSE](LICENSE).
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "id": "probe",
3
- "version": "0.6.2",
4
- "commit": "f08329158885626e02ab24892e4b84cdccb507d6",
5
- "buildTime": "2026-11-11T23:01:15Z",
3
+ "version": "0.7.0",
4
+ "commit": "22ed44240396e36c6e14cf4cb689f449470b3f71",
5
+ "buildTime": "2026-11-15T23:30:20Z",
6
6
  "parts": {
7
7
  "pages": {
8
- "image": "ghcr.io/agentage/probe-pages@sha256:133469abfd0f6858bbcdc6b5a0917244239428d1042385a0ddd047d42b75cc8d"
8
+ "image": "ghcr.io/agentage/probe-pages@sha256:8bd54db9e192753cef0a5bfa03455e3eef158c84c3ac34e1cf35ea8c1e056eba"
9
9
  },
10
10
  "ui": {
11
- "image": "ghcr.io/agentage/probe-ui@sha256:72de84d96bec2518f66f169ef7700c7f0613c399aebb53b39063ca1a942ec596"
11
+ "image": "ghcr.io/agentage/probe-ui@sha256:a336f8a3957bfcd9db0e0667eccaf5f053a9b4106eb65f37fbab625854443c75"
12
12
  },
13
13
  "api": {
14
- "image": "ghcr.io/agentage/probe-api@sha256:cef450a04d6d0b67a5c8b20cf8db0565da8023498bc3902b2503269b0b4b71bb"
14
+ "image": "ghcr.io/agentage/probe-api@sha256:a371ae8f1c534b904d79c750c4a85f4e49fecd1323dcc7683112989f537e67ff"
15
15
  },
16
16
  "mcp": {
17
- "image": "ghcr.io/agentage/probe-mcp@sha256:0f09ad513e49a69d544e51e0de769fd9289d5baf12f7755ae82a331fa3ad0848"
17
+ "image": "ghcr.io/agentage/probe-mcp@sha256:d59f01cfe20a315f7b8768a5be504cd6cffdcbfb1354949edfb60e66750c947d"
18
18
  },
19
19
  "worker": {
20
- "image": "ghcr.io/agentage/probe-worker@sha256:3c57f4fee45e4837feca1e8e0bd217fd6a55c12393d4bb1b85516a3dc54dbec0"
20
+ "image": "ghcr.io/agentage/probe-worker@sha256:473f0bb192c3db7666e52debaa4fe183623c0430569730732273d42a660b6d9e"
21
21
  },
22
22
  "store": {
23
23
  "kind": "postgres",
24
24
  "migrations": 1
25
25
  }
26
26
  },
27
- "openapi": "/api/v1/openapi.json",
27
+ "openapi": "/api/probe/openapi.json",
28
28
  "tools": [
29
29
  {
30
30
  "name": "probe__echo",
@@ -35,7 +35,7 @@
35
35
  {
36
36
  "name": "echo",
37
37
  "element": "probe-echo",
38
- "module": "/ui/0.6.2/probe.js"
38
+ "module": "/ui/0.7.0/probe.js"
39
39
  }
40
40
  ],
41
41
  "commands": [
package/dist/api/index.js CHANGED
@@ -3,12 +3,13 @@ import { ok, parse } from '@agentage/extension';
3
3
  import { EchoQuerySchema } from '../lib/echo.schema.js';
4
4
  import { recentTicks, TicksQuerySchema } from '../lib/ticks.js';
5
5
  import { emit } from './emit.js';
6
- // The kit mounts this router at /api/v1/.
6
+ // The kit mounts this router at /api/probe/.
7
7
  export const create = (ctx) => {
8
8
  const router = Router();
9
9
  router.get('/echo', (req, res) => {
10
10
  const { msg } = parse(EchoQuerySchema, req.query, 'Invalid query');
11
- res.json(ok({ msg, caller: ctx.auth.caller(req)?.sub }));
11
+ const prefix = ctx.settings['echo.prefix'];
12
+ res.json(ok({ msg: prefix ? `${prefix} ${msg}` : msg, caller: ctx.auth.caller(req)?.sub }));
12
13
  });
13
14
  router.get('/ticks', async (req, res) => {
14
15
  const query = parse(TicksQuerySchema, req.query, 'Invalid query');
@@ -4,8 +4,8 @@
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <meta name="agentage-extension" content="probe" />
7
- <meta name="agentage-version" content="0.6.2" />
8
- <title>probe 0.6.2 widgets</title>
7
+ <meta name="agentage-version" content="0.7.0" />
8
+ <title>probe 0.7.0 widgets</title>
9
9
  <style>
10
10
  :root {
11
11
  color-scheme: dark;