@skyramp/mcp 0.5.0-rc.6 → 0.5.0-rc.7
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/package.json
CHANGED
|
@@ -14,7 +14,9 @@ Take these from the guidance, and confirm them in the repositories (routes, conf
|
|
|
14
14
|
header, basic auth, a session cookie, or a preview's bypass header). A token generated at run time is fine.
|
|
15
15
|
- **Ready check:** the route and answer that mean it is ready, such as `GET /health → 200`. A page every route returns,
|
|
16
16
|
like a single-page app's, proves nothing; use a route that returns real data.
|
|
17
|
-
- **
|
|
17
|
+
- **How to tell what runs:** a mechanism that shows the commit each component runs, on every later run: a version
|
|
18
|
+
route, a platform API (Vercel, Netlify, Render, Heroku), GitHub Deployments, a GitOps manifest or Helm values file in
|
|
19
|
+
a Target repository, or Kubernetes metadata. Find the mechanism, never a list of commits.
|
|
18
20
|
|
|
19
21
|
`localhost`, `127.0.0.1` or a container name is not a deployment: it only says where a local bring-up listens.
|
|
20
22
|
|
|
@@ -46,6 +48,18 @@ Say exactly what the user must add, and where:
|
|
|
46
48
|
- `health-check.sh` runs the ready check, signed in when needed, and prints one line per part of at least 16 characters,
|
|
47
49
|
with no secrets: `qa.acme.dev ready: GET /health -> 200`. `health.json` runs it.
|
|
48
50
|
- `get-auth-token.sh`, when sign-in is needed, prints one token for this run. It never logs anyone out.
|
|
51
|
+
- `deployed-revisions.sh` prints one JSON object and nothing else: each component a repository builds, mapped to the
|
|
52
|
+
full commit it runs, such as `{"api": "<40-character commit>"}`. For a source that says only what a deploy tool was
|
|
53
|
+
asked to deploy (GitHub Deployments, a deploy workflow run), give that component an object under its own name:
|
|
54
|
+
`{"api": "<commit>", "web": {"revision": "<commit>", "state": "requested"}}`.
|
|
55
|
+
Expand a short commit inside the script (`gh api repos/<owner>/<repo>/commits/<short> --jq .sha`).
|
|
56
|
+
- Testbot runs it with no agent, before and after each later run, in an empty directory with no checkout. It gets
|
|
57
|
+
the credentials in `environment` as environment variables of those names, `GH_TOKEN` (reads the Target's
|
|
58
|
+
repositories) and `GITHUB_API_URL`. Your own session has no `GH_TOKEN`.
|
|
59
|
+
- Testbot runs it twice at setup. Each commit must be the same in both runs and be a commit of the component's own
|
|
60
|
+
repository, so never print a config repository's commit (Argo CD, Flux) for an app component.
|
|
61
|
+
- A repository it reads that is not one of the Target's: ask to add it to the Target. A network a GitHub-hosted
|
|
62
|
+
runner cannot reach, such as a cluster API: report a blocker that it needs a self-hosted runner.
|
|
49
63
|
|
|
50
64
|
**Otherwise: the prompt does not ask for `environment`, part of it is built, its address changes per PR (a preview), or
|
|
51
65
|
reaching it needs something on the runner** (a tunnel, port-forward, proxy or client certificate):
|
|
@@ -62,13 +76,14 @@ reaching it needs something on the runner** (a tunnel, port-forward, proxy or cl
|
|
|
62
76
|
"environment": {"address": "https://qa.acme.dev", "readyWhen": "GET /health → 200", "credentials": ["QA_TEST_USER"],
|
|
63
77
|
"revisionSources": [{"method": "version_endpoint", "detail": "GET /version", "components": ["api"]}]}
|
|
64
78
|
```
|
|
65
|
-
- `deployed`: the
|
|
79
|
+
- `deployed`: the commit the component runs, as `deployed-revisions.sh` prints it, or `null` when nothing shows it.
|
|
66
80
|
- A deployed part no repository of the Target builds, such as its database, is a component with
|
|
67
81
|
`"repository": "shared"`.
|
|
68
|
-
- **Revision sources
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
- **Revision sources** describe what `deployed-revisions.sh` reads, such as `version_endpoint` with `GET /version`,
|
|
83
|
+
`deploy_workflow`, `kubernetes_labels`, or `command` when no method fits. Each component a repository builds needs
|
|
84
|
+
one. If nothing shows what one runs, ask on the Setup page with a `choose_source` question whose choices are the
|
|
85
|
+
mechanisms you found, never the commits; write the script from the answer. If no answer comes, report a blocker
|
|
86
|
+
asking for it in the Test Environment's notes.
|
|
72
87
|
- Otherwise, leave `environment` and `deployed` out.
|
|
73
88
|
Report each deployed part with these steps:
|
|
74
89
|
- `start`: `Already deployed at <address>` (source `notes`)
|