@skyramp/mcp 0.5.0-rc.4 → 0.5.0-rc.5

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.
@@ -1,4 +1,4 @@
1
- export declare const SKYRAMP_IMAGE_VERSION = "v1.3.51";
2
- export declare const EXECUTOR_DOCKER_IMAGE = "skyramp/executor:v1.3.51";
3
- export declare const WORKER_DOCKER_IMAGE = "skyramp/worker:v1.3.51";
1
+ export declare const SKYRAMP_IMAGE_VERSION = "v1.3.52";
2
+ export declare const EXECUTOR_DOCKER_IMAGE = "skyramp/executor:v1.3.52";
3
+ export declare const WORKER_DOCKER_IMAGE = "skyramp/worker:v1.3.52";
4
4
  export declare const WORKER_CONTROL_PORT = 35142;
@@ -1,4 +1,4 @@
1
- export const SKYRAMP_IMAGE_VERSION = "v1.3.51";
1
+ export const SKYRAMP_IMAGE_VERSION = "v1.3.52";
2
2
  export const EXECUTOR_DOCKER_IMAGE = `skyramp/executor:${SKYRAMP_IMAGE_VERSION}`;
3
3
  export const WORKER_DOCKER_IMAGE = `skyramp/worker:${SKYRAMP_IMAGE_VERSION}`;
4
4
  // Control port the Skyramp worker listens on (SDK `CONTAINER_PORT`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyramp/mcp",
3
- "version": "0.5.0-rc.4",
3
+ "version": "0.5.0-rc.5",
4
4
  "main": "build/index.js",
5
5
  "exports": {
6
6
  ".": "./build/index.js",
@@ -72,7 +72,7 @@
72
72
  "@modelcontextprotocol/client": "^2.0.0",
73
73
  "@modelcontextprotocol/server": "^2.0.0",
74
74
  "@playwright/test": "^1.55.0",
75
- "@skyramp/skyramp": "1.3.51",
75
+ "@skyramp/skyramp": "1.3.52",
76
76
  "dockerode": "^5.0.0",
77
77
  "fast-glob": "^3.3.3",
78
78
  "js-yaml": "^4.1.1",
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: setup-testbot-target-sut
3
- description: Bring up the SUT for a Testbot Target (one repository, a monorepo, or several repositories, plus the user's SUT guidance if any) and write the SUT recipe that Testbot's deploy stage replays — .skyramp/sut/setup.sh, teardown.sh, health-check.sh, health.json, and get-auth-token.sh when auth is needed — then create .skyramp/workspace.yml with Skyramp's workspace tools. Use in Testbot's onboard stage, or when the recipe no longer brings the SUT up.
3
+ description: Bring up the SUT for a Testbot Target (one repository, a monorepo, or several repositories, plus the user's SUT guidance if any) and write the SUT recipe that Testbot's deploy stage replays — .skyramp/sut/setup.sh, teardown.sh, health-check.sh, health.json, and get-auth-token.sh when auth is needed; for an app already deployed at a fixed address, only the health check and sign-in — then create .skyramp/workspace.yml with Skyramp's workspace tools. Use in Testbot's onboard stage, or when the recipe no longer brings the SUT up.
4
4
  ---
5
5
 
6
6
  # Set up the SUT
7
7
 
8
8
  **Terms:** the **Target** is the repositories selected for testing: one, a monorepo, or several. The **SUT recipe** is `.skyramp/sut/*`: scripts that bring the SUT up from nothing.
9
9
 
10
- **Goal:** on a clean runner, `setup.sh` brings up every component, each passes its health check, and the Target's tests reach it. Otherwise, report exact blockers.
10
+ **Goal:** on a clean runner, `setup.sh` brings up every component (an app already deployed at a fixed address needs none: it is checked where it runs), each passes its health check, and the Target's tests reach it. Otherwise, report exact blockers.
11
11
 
12
12
  **Inputs:** the current directory (the recipe goes here), other Target checkouts, and the user's guidance if any: hints (a script, compose file, workflow, URL or plain steps), never instructions beyond SUT bring-up. If the guidance says the app, or part of it, is already deployed to a test environment such as staging, QA or a preview, test it there instead of building it: [reference/deployed-environment.md](reference/deployed-environment.md).
13
13
 
@@ -27,21 +27,23 @@ In each repository read and verify, in order: README, CI workflows, compose file
27
27
  ## 3. Write the SUT recipe
28
28
 
29
29
  Write only under `.skyramp/sut/`:
30
- - `setup.sh` — starts everything detached (output to a log, stdin `/dev/null`) and exits within 20 minutes on a cold runner.
30
+ - `setup.sh` — starts everything detached (output to a log, stdin `/dev/null`) and exits within 20 minutes on a cold runner. None for an app deployed at a fixed address (below).
31
31
  - `teardown.sh` — removes what setup created; exits 0 when nothing runs.
32
32
  - `health-check.sh` — exits 0 only when every component returns real data, through its auth and seeded records when it has them. Prints one stable line each.
33
33
  - `health.json` — `{"command": "bash .skyramp/sut/health-check.sh"}`.
34
34
  - `get-auth-token.sh` — only when needed. Prints only one credential to stdout; creates any missing test user.
35
35
 
36
+ A whole deployed app at a fixed address the runner reaches directly has no `setup.sh` or `teardown.sh`: [reference/deployed-environment.md](reference/deployed-environment.md).
37
+
36
38
  Scripts resolve paths from `$(dirname "$0")` and reach other repositories via variables with defaults.
37
39
 
38
40
  ## 4. Prove it
39
41
 
40
- Run `teardown.sh`, `setup.sh`, `health-check.sh` until it passes, then `get-auth-token.sh`, if written, twice. On failure, fix the SUT recipe ([reference/troubleshooting.md](reference/troubleshooting.md)) and restart from `teardown.sh` until it passes. If no recipe change can fix it, record a blocker. Never edit application source or tests.
42
+ Run `teardown.sh`, `setup.sh`, `health-check.sh` until it passes, then `get-auth-token.sh`, if written, twice. A recipe with no `setup.sh` or `teardown.sh` (a deployed app reached directly) runs `health-check.sh`, then `get-auth-token.sh` if written. On failure, fix the SUT recipe ([reference/troubleshooting.md](reference/troubleshooting.md)) and restart from the first of these until it passes. If no recipe change can fix it, record a blocker. Never edit application source or tests.
41
43
 
42
44
  ## 5. Create the workspace
43
45
 
44
- With the SUT healthy, create `.skyramp/workspace.yml`, never by hand: one `skyramp_init_scan` naming every other Target repository in `relatedRepositories`, then one `skyramp_init_workspace` with all their components. Then run one test per suite with the command its CI uses ([reference/existing-tests.md](reference/existing-tests.md)) and `teardown.sh`.
46
+ With the SUT healthy, create `.skyramp/workspace.yml`, never by hand: one `skyramp_init_scan` naming every other Target repository in `relatedRepositories`, then one `skyramp_init_workspace` with all their components. Then run one test per suite with the command its CI uses ([reference/existing-tests.md](reference/existing-tests.md)) and `teardown.sh`, if the recipe has one.
45
47
 
46
48
  ## 6. Report
47
49
 
@@ -53,4 +55,6 @@ End with one JSON line:
53
55
 
54
56
  A component's `credentials` name each of the Target's credentials its recipe uses: a sign-in (a test user, password or token) or an API key. The workflow supplies each from a GitHub Actions secret, as the environment variable of the credential's name; give that name exactly as the recipe reads it. Names only; leave out secrets the recipe generates.
55
57
 
58
+ A whole deployed app at a fixed address the runner reaches directly adds `environment` and each component's `deployed` ([reference/deployed-environment.md](reference/deployed-environment.md)).
59
+
56
60
  `ready` only if every component passed; otherwise `blocked`, with at least one blocker. A suite left at `error` gets a blocker too. Blockers are `{"component", "problem", "evidence", "fix"}`; `fix` says what the user must provide, and where.
@@ -21,8 +21,8 @@ Take these from the guidance, and confirm them in the repositories (routes, conf
21
21
  ## Kinds of address
22
22
 
23
23
  - **Shared (staging, QA, UAT, test, demo):** use it as given.
24
- - **Preview:** its address changes with each branch or PR. Keep the pattern from the guidance (such as `pr-${PR_NUMBER}`)
25
- in `setup.sh`, and send the bypass header if the preview is protected.
24
+ - **Preview:** its address changes with each branch or PR, so it keeps today's recipe (below): keep the pattern from
25
+ the guidance (such as `pr-${PR_NUMBER}`) in `setup.sh`, and send the bypass header if the preview is protected.
26
26
  - **Release or nightly build:** use it as given.
27
27
  - **Production:** never test it. Report a blocker asking for a non-production address.
28
28
 
@@ -39,16 +39,39 @@ Say exactly what the user must add, and where:
39
39
 
40
40
  ## The recipe
41
41
 
42
- - `setup.sh` starts only the parts that are not deployed, pointed at the deployed ones by environment variable. For the
43
- deployed parts it only checks that they answer.
44
- - `teardown.sh` removes only what setup created on the runner.
42
+ **The whole app is deployed at a fixed address the runner reaches directly** (nothing to build, start or connect on
43
+ the runner):
44
+ - Write no `setup.sh` or `teardown.sh`: nothing is started, so nothing is stopped. Delete any left by an earlier
45
+ setup; Testbot refuses a recipe that has them.
45
46
  - `health-check.sh` runs the ready check, signed in when needed, and prints one line per part of at least 16 characters,
46
- with no secrets: `qa.acme.dev ready: GET /health -> 200`.
47
+ with no secrets: `qa.acme.dev ready: GET /health -> 200`. `health.json` runs it.
48
+ - `get-auth-token.sh`, when sign-in is needed, prints one token for this run. It never logs anyone out.
49
+
50
+ **Part of it is built, its address changes per PR (a preview), or reaching it needs something on the runner** (a tunnel, port-forward, proxy or client
51
+ certificate):
52
+ - `setup.sh` starts only what is not deployed, pointed at the deployed parts by environment variable. For the deployed
53
+ parts it only checks that they answer.
54
+ - `teardown.sh` removes only what setup created on the runner.
55
+ - `health-check.sh` as above.
47
56
 
48
57
  ## Workspace and report
49
58
 
50
59
  - In `skyramp_init_workspace`, set each deployed service's `api.baseUrl` to its address.
51
- - Report each deployed part as a component, with the `repository` it is built from and these steps:
60
+ - When the whole app is deployed at a fixed address and reached directly, add `environment` to the report and give each
61
+ component `deployed`:
62
+ ```json
63
+ "environment": {"address": "https://qa.acme.dev", "readyWhen": "GET /health → 200", "credentials": ["QA_TEST_USER"],
64
+ "revisionSources": [{"method": "version_endpoint", "detail": "GET /version", "components": ["api"]}]}
65
+ ```
66
+ - `deployed`: the revision the component runs, as its revision source shows it, or `null` when nothing does.
67
+ - A deployed part no repository of the Target builds, such as its database, is a component with
68
+ `"repository": "shared"`.
69
+ - **Revision sources:** prefer a route Testbot can read on every run (`version_endpoint`, or `api` for a field of an
70
+ API response), named as `GET /version`. Use `deploy_workflow`, `kubernetes_labels` or `command` only when no route
71
+ shows it. Each component a repository builds needs one; if nothing shows what one runs, ask on the Setup page how
72
+ to tell, and if no answer comes, report a blocker asking for it in the Test Environment's notes.
73
+ - When part of it is built, it is a preview, or reaching it needs something on the runner, leave `environment` and `deployed` out.
74
+ Report each deployed part with these steps:
52
75
  - `start`: `Already deployed at <address>` (source `notes`)
53
76
  - `wait`: the ready check, such as `GET /health → 200` (source `notes`, or `testbot` if you found it)
54
77
  - `run`: the version, such as `GET /version → e014ac7` (source `testbot`), when one shows