@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 +80 -62
- package/dist/agentage-extension.json +10 -10
- package/dist/api/index.js +3 -2
- package/dist/ui/harness.html +2 -2
- package/dist/ui/probe.js +1 -1
- package/dist/ui/widgets.json +1 -1
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -1,83 +1,101 @@
|
|
|
1
1
|
# extension-probe
|
|
2
2
|
|
|
3
|
-
The probe
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
26
|
-
npx agentage extension up
|
|
27
|
-
|
|
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) #
|
|
30
|
-
curl -s -H "Authorization: Bearer $T" "localhost:4280/api/
|
|
31
|
-
npx agentage extension install . # linked
|
|
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 #
|
|
52
|
+
npx agentage extension down # removes the containers, network and volume
|
|
34
53
|
```
|
|
35
54
|
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
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
|
-
|
|
61
|
+
More: [docs/develop.md](docs/develop.md#run-it-from-a-clone)
|
|
48
62
|
|
|
49
|
-
|
|
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
|
-
|
|
58
|
-
against the same `up`, from a checkout of that repo:
|
|
65
|
+
What CI runs, in order:
|
|
59
66
|
|
|
60
67
|
```bash
|
|
61
|
-
npm
|
|
62
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
`@agentage/extension-probe` to npm with provenance.
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
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.
|
|
4
|
-
"commit": "
|
|
5
|
-
"buildTime": "2026-11-
|
|
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:
|
|
8
|
+
"image": "ghcr.io/agentage/probe-pages@sha256:8bd54db9e192753cef0a5bfa03455e3eef158c84c3ac34e1cf35ea8c1e056eba"
|
|
9
9
|
},
|
|
10
10
|
"ui": {
|
|
11
|
-
"image": "ghcr.io/agentage/probe-ui@sha256:
|
|
11
|
+
"image": "ghcr.io/agentage/probe-ui@sha256:a336f8a3957bfcd9db0e0667eccaf5f053a9b4106eb65f37fbab625854443c75"
|
|
12
12
|
},
|
|
13
13
|
"api": {
|
|
14
|
-
"image": "ghcr.io/agentage/probe-api@sha256:
|
|
14
|
+
"image": "ghcr.io/agentage/probe-api@sha256:a371ae8f1c534b904d79c750c4a85f4e49fecd1323dcc7683112989f537e67ff"
|
|
15
15
|
},
|
|
16
16
|
"mcp": {
|
|
17
|
-
"image": "ghcr.io/agentage/probe-mcp@sha256:
|
|
17
|
+
"image": "ghcr.io/agentage/probe-mcp@sha256:d59f01cfe20a315f7b8768a5be504cd6cffdcbfb1354949edfb60e66750c947d"
|
|
18
18
|
},
|
|
19
19
|
"worker": {
|
|
20
|
-
"image": "ghcr.io/agentage/probe-worker@sha256:
|
|
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/
|
|
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.
|
|
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/
|
|
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
|
-
|
|
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');
|
package/dist/ui/harness.html
CHANGED
|
@@ -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.
|
|
8
|
-
<title>probe 0.
|
|
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;
|