@agentage/extension-probe 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +45 -2
- package/dist/agentage-extension.json +11 -0
- package/dist/api/echo.schema.d.ts +5 -0
- package/dist/api/echo.schema.js +4 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +12 -0
- package/package.json +71 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agentage Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
-
#
|
|
1
|
+
# extension-probe
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The probe extension: one agentage extension with every part kind, the template every later
|
|
4
|
+
extension copies. Today it has the api part: `GET /api/v1/echo?msg=hi` answers
|
|
5
|
+
`{"success":true,"data":{"msg":"hi"}}` in the standard envelope, with an `agcid` header. The part
|
|
6
|
+
code is only `create(ctx)` in [`src/api/index.ts`](src/api/index.ts); the kit
|
|
7
|
+
[`@agentage/extension`](https://github.com/agentage/platform) owns the server, `/health`, the
|
|
8
|
+
discovery document and the envelope. There is no Dockerfile: the kit's build tool builds the image.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm ci
|
|
14
|
+
npm run build
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Until `@agentage/extension` is on npm, install it from a packed kit (see `scripts/kit-lock.mjs`):
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
(cd ../platform && npm ci && npm run build && npm pack -w @agentage/extension --pack-destination ../extension-probe/.kit)
|
|
21
|
+
node scripts/kit-lock.mjs local .kit/agentage-extension-0.1.0.tgz && npm ci
|
|
22
|
+
node scripts/kit-lock.mjs registry # before committing
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Run the image locally
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node ../platform/packages/extension/dist/tool/cli.js build # or: agentage extension build
|
|
29
|
+
docker run --rm --network host ghcr.io/agentage/probe-api:0.1.0
|
|
30
|
+
curl -s 127.0.0.1:3000/health # loopback only; commit = the build commit
|
|
31
|
+
curl -s '127.0.0.1:3000/api/v1/echo?msg=hi'
|
|
32
|
+
curl -s 127.0.0.1:3000/.well-known/agentage-extension.json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Verify
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm run verify
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Release
|
|
42
|
+
|
|
43
|
+
A `v*` tag equal to the `package.json` version runs `.github/workflows/release.yml`: it builds and
|
|
44
|
+
pushes `ghcr.io/agentage/probe-api:{version}`, attaches the build record with the image digests to
|
|
45
|
+
the GitHub release as `agentage-extension.json`, and publishes `@agentage/extension-probe` to npm
|
|
46
|
+
with provenance.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "probe",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"commit": "471a6d3373c868b4b19fed3cb1d48cdf4c0282d7",
|
|
5
|
+
"buildTime": "2026-11-03T22:56:15Z",
|
|
6
|
+
"parts": {
|
|
7
|
+
"api": {
|
|
8
|
+
"image": "ghcr.io/agentage/probe-api@sha256:1a89dafc7eec2cb388b0b77c1c8ebc52bf65d49e7f9b6cf8a47a2ca979666850"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Router } from 'express';
|
|
2
|
+
import { ok, parse } from '@agentage/extension';
|
|
3
|
+
import { EchoQuerySchema } from './echo.schema.js';
|
|
4
|
+
// The api part: mounted by the kit at /api/v1/; the caller field arrives with the token check.
|
|
5
|
+
export const create = (_ctx) => {
|
|
6
|
+
const router = Router();
|
|
7
|
+
router.get('/echo', (req, res) => {
|
|
8
|
+
const { msg } = parse(EchoQuerySchema, req.query, 'Invalid query');
|
|
9
|
+
res.json(ok({ msg }));
|
|
10
|
+
});
|
|
11
|
+
return router;
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentage/extension-probe",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The probe extension: one of every agentage part kind, the template every later extension copies",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/agentage/extension-probe.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://agentage.io",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/agentage/extension-probe/issues"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22",
|
|
20
|
+
"agentage": "^0.1"
|
|
21
|
+
},
|
|
22
|
+
"agentage": {
|
|
23
|
+
"id": "probe",
|
|
24
|
+
"parts": {
|
|
25
|
+
"api": true
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"exports": {
|
|
29
|
+
"./api": {
|
|
30
|
+
"types": "./dist/api/index.d.ts",
|
|
31
|
+
"default": "./dist/api/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./agentage-extension.json": "./dist/agentage-extension.json",
|
|
34
|
+
"./package.json": "./package.json"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist",
|
|
38
|
+
"!dist/**/*.test.*"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsc -p tsconfig.build.json",
|
|
42
|
+
"type-check": "tsc --noEmit",
|
|
43
|
+
"lint": "eslint .",
|
|
44
|
+
"format": "prettier --write .",
|
|
45
|
+
"format:check": "prettier --check .",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:coverage": "vitest run --coverage",
|
|
48
|
+
"verify": "npm run type-check && npm run lint && npm run format:check && npm run test:coverage && npm run build",
|
|
49
|
+
"prepublishOnly": "npm run verify"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@agentage/extension": "^0.1.0",
|
|
53
|
+
"express": "^5.1.0",
|
|
54
|
+
"zod": "^4.2.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/express": "5.0.6",
|
|
58
|
+
"@types/node": "26.6.5",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "8.72.1",
|
|
60
|
+
"@typescript-eslint/parser": "8.72.1",
|
|
61
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
62
|
+
"eslint": "10.13.0",
|
|
63
|
+
"eslint-config-prettier": "10.1.8",
|
|
64
|
+
"eslint-plugin-prettier": "5.5.7",
|
|
65
|
+
"prettier": "3.9.10",
|
|
66
|
+
"typescript": "6.0.3",
|
|
67
|
+
"vitest": "5.0.5"
|
|
68
|
+
},
|
|
69
|
+
"keywords": [
|
|
70
|
+
"agentage",
|
|
71
|
+
"agentage-extension"
|
|
72
|
+
]
|
|
73
|
+
}
|