@capagents/forgeqe 3.1.2 → 3.1.3
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/HOW_TO_USE.md +5003 -2077
- package/README.md +155 -449
- package/dist/docs-site/docs/app-theme.css +30 -9
- package/dist/docs-site/docs/architecture/index.html +45 -515
- package/dist/docs-site/docs/architecture-reference/index.html +1781 -0
- package/dist/docs-site/docs/area-api/index.html +257 -116
- package/dist/docs-site/docs/area-automated-tests/index.html +1229 -419
- package/dist/docs-site/docs/area-browser/index.html +167 -125
- package/dist/docs-site/docs/area-data/index.html +178 -188
- package/dist/docs-site/docs/area-desktop/index.html +329 -282
- package/dist/docs-site/docs/area-mobile/index.html +138 -86
- package/dist/docs-site/docs/area-operations/index.html +567 -393
- package/dist/docs-site/docs/area-pull-requests/index.html +114 -32
- package/dist/docs-site/docs/area-quality/index.html +111 -49
- package/dist/docs-site/docs/area-release/index.html +180 -65
- package/dist/docs-site/docs/area-setup/index.html +742 -339
- package/dist/docs-site/docs/area-systems/index.html +32 -48
- package/dist/docs-site/docs/area-test-cases/index.html +387 -154
- package/dist/docs-site/docs/containers/index.html +87 -101
- package/dist/docs-site/docs/cost-architecture/index.html +4 -3
- package/dist/docs-site/docs/custom-agents-first-run/index.html +108 -50
- package/dist/docs-site/docs/desktop/index.html +277 -297
- package/dist/docs-site/docs/desktop-ci/index.html +15 -5
- package/dist/docs-site/docs/docs-tabs.js +56 -0
- package/dist/docs-site/docs/evidence/index.html +50 -49
- package/dist/docs-site/docs/feature-test-prompts/index.html +34 -24
- package/dist/docs-site/docs/get-started/index.html +464 -168
- package/dist/docs-site/docs/graphify/index.html +8 -7
- package/dist/docs-site/docs/guardrails/index.html +20 -4
- package/dist/docs-site/docs/index.html +4 -3
- package/dist/docs-site/docs/mobile/index.html +96 -76
- package/dist/docs-site/docs/model-routing/index.html +44 -18
- package/dist/docs-site/docs/overview/index.html +23 -7
- package/dist/docs-site/docs/product-graph/index.html +13 -12
- package/dist/docs-site/docs/product-knowledge/index.html +16 -5
- package/dist/docs-site/docs/product-views/index.html +7 -6
- package/dist/docs-site/docs/reference/index.html +95 -65
- package/dist/docs-site/docs/search.js +1 -1
- package/dist/docs-site/docs/using/index.html +444 -126
- package/dist/docs-site/docs/web-app/index.html +54 -51
- package/dist/forgeqe.js +1822 -1822
- package/dist/web/assets/Agent-3pV8Rwap.js +8 -0
- package/dist/web/assets/AgentWork-DAnmH0My.js +2 -0
- package/dist/web/assets/ApiTests-DW4MRFzG.js +10 -0
- package/dist/web/assets/Browse-Bd0ZZfc2.js +1 -0
- package/dist/web/assets/Chat-DnBUm_97.js +3 -0
- package/dist/web/assets/CommandPalette-B1O9aDTk.js +1 -0
- package/dist/web/assets/Compare-1v7_ca7z.js +1 -0
- package/dist/web/assets/Cost-CWrc4McH.js +1 -0
- package/dist/web/assets/Data-rWSiG4Cq.js +6 -0
- package/dist/web/assets/Desktop-3x6EQqos.js +1 -0
- package/dist/web/assets/DesktopReview-cSA10Rm3.js +1 -0
- package/dist/web/assets/Evidence-CKy3o7cw.js +1 -0
- package/dist/web/assets/{Explore-ObkEpUyS.js → Explore-CMAxWE_8.js} +2 -2
- package/dist/web/assets/Features-haQchkhA.js +1 -0
- package/dist/web/assets/{Flags-0-RniPJm.js → Flags-BaQjYi_t.js} +2 -2
- package/dist/web/assets/Flaky-DUuC0qTn.js +1 -0
- package/dist/web/assets/Impact-CP0H8ygo.js +3 -0
- package/dist/web/assets/Jobs-cYxoYd3i.js +5 -0
- package/dist/web/assets/KindPage-DWW8gN5_.js +6 -0
- package/dist/web/assets/Migration-Bsm7WU1d.js +2 -0
- package/dist/web/assets/PageAgent-c95zT2PJ.js +1 -0
- package/dist/web/assets/Product-BQSiR28a.js +7 -0
- package/dist/web/assets/Production-CAv0Vtoy.js +1 -0
- package/dist/web/assets/Quality-aQPaPYQc.js +1 -0
- package/dist/web/assets/Readiness-CkknP87n.js +1 -0
- package/dist/web/assets/Record-09IsC9U-.js +1 -0
- package/dist/web/assets/Regression-BL4MfN47.js +5 -0
- package/dist/web/assets/RelationGraph-Dg4fqt7l.js +1 -0
- package/dist/web/assets/Reports-CMV1l-iS.js +2 -0
- package/dist/web/assets/Response-DTBFBeKB.js +9 -0
- package/dist/web/assets/Responsive-DBRQ9FUO.js +3 -0
- package/dist/web/assets/RunDiff-CMDrnsA3.js +1 -0
- package/dist/web/assets/Runs-Dkeu6_vZ.js +2 -0
- package/dist/web/assets/Settings-KjKm8h-_.js +21 -0
- package/dist/web/assets/{Steps-D-YG0eJy.js → Steps-HYHK9psI.js} +1 -1
- package/dist/web/assets/TestCases-Cv6-OSv0.js +1 -0
- package/dist/web/assets/TestData-DbEfNlUE.js +2 -0
- package/dist/web/assets/TestDebt-DzHQIU4X.js +1 -0
- package/dist/web/assets/TestManagement-BgRTGHMT.js +1 -0
- package/dist/web/assets/Tosca-DZpHAtnH.js +3 -0
- package/dist/web/assets/WhatsNew-jp0c4WSV.js +1 -0
- package/dist/web/assets/coverage-BB9BLjGz.js +5 -0
- package/dist/web/assets/{dataParts-DbeCj9ga.js → dataParts-DEPK4eQE.js} +2 -2
- package/dist/web/assets/{diff-BStuTmsN.js → diff-CcNwLCX6.js} +1 -1
- package/dist/web/assets/{families-BBFFrUlo.js → families-gkpkloLT.js} +1 -1
- package/dist/web/assets/filters-C7phIFfd.js +1 -0
- package/dist/web/assets/fold-i73P-EDV.js +1 -0
- package/dist/web/assets/head-BtTqyLlj.js +1 -0
- package/dist/web/assets/{highlight-BcFZIf59.js → highlight-DZI39CzZ.js} +1 -1
- package/dist/web/assets/index-ClFOh63x.css +2 -0
- package/dist/web/assets/index-YGWJEkAT.js +64 -0
- package/dist/web/assets/input-C2vQ9O3a.js +1 -0
- package/dist/web/assets/logos-BmbNTDu2.js +1 -0
- package/dist/web/assets/palette-XFlqvgZl.js +1 -0
- package/dist/web/assets/{paletteCommands-Co-RlQ8q.js → paletteCommands-DsbD2ASU.js} +1 -1
- package/dist/web/assets/parts-DEVx2Sea.js +1 -0
- package/dist/web/assets/productParts-Bi-XjszL.js +1 -0
- package/dist/web/assets/qualityParts-Dbu01g7G.js +1 -0
- package/dist/web/assets/{recordTest-Cez2sDJO.js → recordTest--Wr40QdN.js} +1 -1
- package/dist/web/assets/route-Dg53WdFu.js +1 -0
- package/dist/web/index.html +6 -7
- package/docs/ARCHITECTURE.md +50 -563
- package/docs/ARCHITECTURE_REFERENCE.md +1484 -0
- package/docs/CONTAINERS.md +87 -87
- package/docs/CUSTOM_AGENTS_FIRST_RUN.md +125 -43
- package/docs/DESKTOP-CI.md +18 -3
- package/docs/DESKTOP.md +298 -297
- package/docs/MOBILE.md +103 -71
- package/docs/MODEL_ROUTING.md +48 -15
- package/docs/WEB_APP.md +49 -44
- package/docs/feature-test-prompts.md +29 -16
- package/docs/user-guide.html +5263 -2453
- package/guardrails/README.md +22 -2
- package/knowledge/README.md +15 -2
- package/package.json +1 -1
- package/prompts/brain.md +1 -0
- package/py/forgeqe_engine/recordsession.py +100 -24
- package/dist/web/assets/Agent-CPhmZdFX.js +0 -8
- package/dist/web/assets/AgentWork-BXdN9xgi.js +0 -2
- package/dist/web/assets/ApiTests-Do3xLjfB.js +0 -10
- package/dist/web/assets/Browse-WVkJT6Bs.js +0 -2
- package/dist/web/assets/Chat-CDc9UcQX.js +0 -3
- package/dist/web/assets/CommandPalette-BAZm62lV.js +0 -1
- package/dist/web/assets/Compare-Br6n9T9L.js +0 -1
- package/dist/web/assets/Cost-BBUyBu3Y.js +0 -1
- package/dist/web/assets/Data-Ch2DPEWp.js +0 -6
- package/dist/web/assets/Desktop-Qzoq-cQv.js +0 -1
- package/dist/web/assets/DesktopReview-CF_jQYAM.js +0 -1
- package/dist/web/assets/Evidence-C72Lj5_Q.js +0 -1
- package/dist/web/assets/Features-CQzNo_WP.js +0 -1
- package/dist/web/assets/Flaky-BPJvNLCA.js +0 -1
- package/dist/web/assets/Impact-CfccsL_k.js +0 -3
- package/dist/web/assets/Jobs-T6m4zhDy.js +0 -5
- package/dist/web/assets/KindPage-BDUvWe2p.js +0 -6
- package/dist/web/assets/Migration-Dqeh4x5u.js +0 -2
- package/dist/web/assets/PageAgent-DNjzIgeY.js +0 -1
- package/dist/web/assets/Product-nYV_scOV.js +0 -7
- package/dist/web/assets/Production-CGSbEWVa.js +0 -1
- package/dist/web/assets/Quality-BIypojZm.js +0 -1
- package/dist/web/assets/Readiness-BlRjwJRg.js +0 -1
- package/dist/web/assets/Record-v2KLI-_Z.js +0 -1
- package/dist/web/assets/Regression-B-jSt4Jz.js +0 -5
- package/dist/web/assets/RelationGraph-8J98lOVG.js +0 -1
- package/dist/web/assets/Reports-GI4u6SyW.js +0 -2
- package/dist/web/assets/Response-mhBThq2b.js +0 -9
- package/dist/web/assets/Responsive-DXu7Ra7K.js +0 -3
- package/dist/web/assets/RunDiff-D0SHDNp0.js +0 -1
- package/dist/web/assets/Runs-C1Gjdi9M.js +0 -2
- package/dist/web/assets/Settings-BGGeuvyF.js +0 -21
- package/dist/web/assets/TestCases-DC4w77eQ.js +0 -1
- package/dist/web/assets/TestData-CvKWRVVV.js +0 -2
- package/dist/web/assets/TestDebt-D8YzN29_.js +0 -1
- package/dist/web/assets/TestManagement-C5cDCqrD.js +0 -1
- package/dist/web/assets/Tosca-BGUv3RiJ.js +0 -3
- package/dist/web/assets/WhatsNew-B_Gyuv8O.js +0 -1
- package/dist/web/assets/coverage-BMP6ELFJ.js +0 -5
- package/dist/web/assets/filters-CnAMr286.js +0 -1
- package/dist/web/assets/fold-D_O_VZui.js +0 -1
- package/dist/web/assets/head-CRo48rPt.js +0 -1
- package/dist/web/assets/index-B3JsM7tv.js +0 -64
- package/dist/web/assets/index-CafApcbZ.css +0 -2
- package/dist/web/assets/input-CtzK50ZF.js +0 -1
- package/dist/web/assets/line-icons-rdF8DYDJ.js +0 -1
- package/dist/web/assets/logos-D4oVWzqa.js +0 -1
- package/dist/web/assets/palette-DAaGSao7.js +0 -1
- package/dist/web/assets/parts-D357Wolo.js +0 -1
- package/dist/web/assets/productParts-B8oHRCJF.js +0 -1
- package/dist/web/assets/qualityParts-BLkmIfDY.js +0 -1
- package/dist/web/assets/route-BloYJWgw.js +0 -1
package/docs/CONTAINERS.md
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
# ForgeQE containers: services and mocks in Docker or Podman
|
|
2
2
|
|
|
3
|
-
Status:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
- Postgres from forgeqe.yaml and from a compose file.
|
|
7
|
-
- A WireMock mock that answers a recorded run's calls.
|
|
8
|
-
- A tests container that reaches the database by name and writes its results into the repository as this machine's
|
|
9
|
-
user.
|
|
3
|
+
Status: tested on real Docker with Postgres from forgeqe.yaml and from a compose file, a WireMock mock that answers a
|
|
4
|
+
recorded run's calls, and a tests container that reaches the database by name and writes its results into the
|
|
5
|
+
repository as this machine's user.
|
|
10
6
|
|
|
11
7
|
ForgeQE uses Docker or Podman, when one is installed, for five jobs:
|
|
12
8
|
|
|
@@ -14,20 +10,47 @@ ForgeQE uses Docker or Podman, when one is installed, for five jobs:
|
|
|
14
10
|
forgeqe.yaml, or in a docker-compose file that forgeqe.yaml names.
|
|
15
11
|
- **Mocks of an API:** WireMock stubs made from the calls a browser run recorded, or from an OpenAPI description, so
|
|
16
12
|
the tests can run without the real service.
|
|
17
|
-
- **The repository's tests in a container:**
|
|
13
|
+
- **The repository's tests in a container:** ForgeQE runs the test command you confirmed in an image, instead of
|
|
18
14
|
on this machine, after starting the services the tests need.
|
|
19
15
|
- **A workspace for the coding agents:** with `containers.workspace`, Quill's shell commands (build, restore, run,
|
|
20
16
|
git) and every test ForgeQE runs for it go to a container of the project's image. The agents stay on this machine.
|
|
21
17
|
- **A browser in a container:** with `browser.provider: docker`, the browser agent, the replay and Quill's live
|
|
22
|
-
browser
|
|
18
|
+
browser use Chromium in a container of Microsoft's Playwright image.
|
|
23
19
|
|
|
24
20
|
Quill also has a `testcontainers` skill, for tests that start their own services from code (below).
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
neither Docker nor Podman is on PATH, the agent isn't offered these tools.
|
|
22
|
+
When neither Docker nor Podman is on PATH, ForgeQE's agent does not offer to start services or mocks.
|
|
28
23
|
|
|
29
24
|
## Use
|
|
30
25
|
|
|
26
|
+
**Setting it up.** Pick the runtime, declare the services, and choose which jobs use containers.
|
|
27
|
+
|
|
28
|
+
**Web app**
|
|
29
|
+
|
|
30
|
+
1. Open **Settings › Containers**.
|
|
31
|
+
2. Under **Runtime**, pick the **Runtime** (empty: Docker, else Podman), and optionally **Compose files** and the
|
|
32
|
+
**Mocks' image**.
|
|
33
|
+
3. Add each service with its **Image**, **Ports**, **Environment**, **Secrets**, **Mounts**, **Starts after** and when it
|
|
34
|
+
is ready.
|
|
35
|
+
4. Fill in **Tests in a container**, **The coding agents' workspace** or **Browser in a container** for the jobs that
|
|
36
|
+
should use one.
|
|
37
|
+
|
|
38
|
+
For the browser, also pick **Chrome in Docker** as the **Browser** in **Settings › Browser**.
|
|
39
|
+
|
|
40
|
+
**Terminal**
|
|
41
|
+
|
|
42
|
+
Edit `containers:` in forgeqe.yaml (see [Declaring services](#declaring-services)), and `browser.provider: docker`
|
|
43
|
+
for the browser.
|
|
44
|
+
|
|
45
|
+
**Starting and stopping services.**
|
|
46
|
+
|
|
47
|
+
**Web app**
|
|
48
|
+
|
|
49
|
+
In a chat, ask, for example: "start the database", "is the queue up?", "stop the services". The agent asks before it
|
|
50
|
+
starts anything.
|
|
51
|
+
|
|
52
|
+
**Terminal**
|
|
53
|
+
|
|
31
54
|
```bash
|
|
32
55
|
forgeqe services # the declared services, what runs, whether the runtime answers
|
|
33
56
|
forgeqe services up # start every declared service and wait until each is ready
|
|
@@ -36,14 +59,11 @@ forgeqe services logs db --lines 50 # last lines, secrets removed
|
|
|
36
59
|
forgeqe services down # stop and remove this project's containers (mocks included)
|
|
37
60
|
```
|
|
38
61
|
|
|
39
|
-
|
|
40
|
-
- "start the database"
|
|
41
|
-
- "is the queue up?"
|
|
42
|
-
- "mock the payments API from the last run"
|
|
43
|
-
- "make a mock service from openapi.yaml and point order-api at it"
|
|
44
|
-
- "stop the services"
|
|
62
|
+
The same requests work in `forgeqe start` or `forgeqe run`.
|
|
45
63
|
|
|
46
|
-
|
|
64
|
+
**Making a mock.** This is done by asking ForgeQE's agent, in a web chat, `forgeqe start` or `forgeqe run`: "mock the
|
|
65
|
+
payments API from the last run", or "make a mock service from openapi.yaml and point order-api at it". See
|
|
66
|
+
[Mocks](#mocks).
|
|
47
67
|
|
|
48
68
|
## Declaring services
|
|
49
69
|
|
|
@@ -130,17 +150,16 @@ containers:
|
|
|
130
150
|
secrets: [TEST_DB_PASSWORD]
|
|
131
151
|
```
|
|
132
152
|
|
|
133
|
-
With `containers.tests` set
|
|
134
|
-
|
|
153
|
+
With `containers.tests` set (**Tests in a container** in Settings › Containers), the repository's tests ForgeQE runs go
|
|
154
|
+
to that image, unless the agent is asked to run them on this machine. The confirmation says where the tests will run.
|
|
155
|
+
The container:
|
|
135
156
|
|
|
136
|
-
- **Runs the command
|
|
137
|
-
never on this machine.
|
|
157
|
+
- **Runs the command you confirmed** with the image's own shell, inside the container, never on this machine.
|
|
138
158
|
- **Mounts the repository read-write at its own path** and works in it, so results land where ForgeQE reads them.
|
|
139
159
|
On this machine, the tests already have the whole disk. A folder outside the repository that the results go to is
|
|
140
160
|
mounted the same way.
|
|
141
|
-
- **Runs as this machine's user
|
|
142
|
-
|
|
143
|
-
stopped.
|
|
161
|
+
- **Runs as this machine's user**, so files it writes are yours. It cannot gain privileges, has a process limit, and
|
|
162
|
+
is removed when the run ends or is stopped.
|
|
144
163
|
- **Gets only these variables:** `CI=1`, `NO_COLOR`, `HOME=/tmp`, the environment's `FORGEQE_ACTIVE_ENV`,
|
|
145
164
|
`FORGEQE_APP_*` and `FORGEQE_VAR_*`, the saved logins' variables, and `containers.tests` `env` and `secrets`.
|
|
146
165
|
Secrets are passed by name. ForgeQE's own keys are never passed.
|
|
@@ -163,35 +182,36 @@ containers:
|
|
|
163
182
|
secrets: [TEST_DB_PASSWORD] # by name; values from the environment or .env
|
|
164
183
|
```
|
|
165
184
|
|
|
166
|
-
With `containers.workspace` set:
|
|
167
|
-
|
|
168
|
-
- **Quill's shell runs in the container.**
|
|
169
|
-
|
|
170
|
-
in
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
on this machine and keeps its shell here. `FORGEQE_HOST_RUN=1` runs everything on this machine for a session.
|
|
185
|
+
With `containers.workspace` set (**The coding agents' workspace** in Settings › Containers):
|
|
186
|
+
|
|
187
|
+
- **Quill's shell runs in the container.** Each command Quill runs goes to the workspace container, in the same folder.
|
|
188
|
+
A folder outside the repository is refused, since the container has only the repository. Quill is told its commands
|
|
189
|
+
run in a Linux container of that image.
|
|
190
|
+
- **Every test ForgeQE runs goes to the same image:** the coding loop's runs, healing, a suite's existing tests and the
|
|
191
|
+
tests you ask the agent to run. Each run gets its own container, so stopping a run removes it, with the browsers the
|
|
192
|
+
test started.
|
|
193
|
+
- **What stays on this machine:** the coding agents themselves, the model key, ForgeQE's other secrets, reading and
|
|
194
|
+
editing files (the repository is the same folder in both places), and ForgeQE's own agent, which works with you on
|
|
195
|
+
this machine and keeps its shell here. `FORGEQE_HOST_RUN=1` runs everything on this machine for a session.
|
|
178
196
|
- **The container:**
|
|
179
197
|
- one per ForgeQE process and project, `forgeqe-<project>-workspace-<id>`, removed when ForgeQE ends;
|
|
180
198
|
- the repository mounted read-write at its own path; credential files in it (`.env`, `.env.*` except templates,
|
|
181
199
|
`.npmrc`, `.netrc`, `*.pem`, `*.key`, `id_*` keys) covered with an empty read-only file, and `.ssh`, `.aws`,
|
|
182
200
|
`.azure`, `.docker`, `.kube` and `.forgeqe/sessions` with an empty folder;
|
|
183
|
-
- `HOME` on the project's volume `forgeqe-<project>-home`, so NuGet, npm and pip caches outlive the session
|
|
184
|
-
|
|
185
|
-
- this machine's user (`--user uid:gid`), `no-new-privileges`, `--pids-limit 4096`, the project network;
|
|
201
|
+
- `HOME` on the project's volume `forgeqe-<project>-home`, so NuGet, npm and pip caches outlive the session;
|
|
202
|
+
- this machine's user, no privilege gain, a process limit, the project network;
|
|
186
203
|
- only `CI=1`, `HOME`, the `env` and `secrets` listed, and, in each command, the environment's `FORGEQE_APP_*` and
|
|
187
204
|
`FORGEQE_VAR_*` and the saved logins' variables, by name.
|
|
188
|
-
- **`containers.tests`** still names the image
|
|
189
|
-
workspace's image.
|
|
205
|
+
- **`containers.tests`** still names the image for running the repository's tests when it is set. Without it, those
|
|
206
|
+
tests use the workspace's image.
|
|
190
207
|
|
|
191
208
|
This needs a Linux or macOS machine, as tests in a container do.
|
|
192
209
|
|
|
193
210
|
## The browser in a container
|
|
194
211
|
|
|
212
|
+
In the web app, pick **Chrome in Docker** as the **Browser** in **Settings › Browser**, and set the image and **Without
|
|
213
|
+
a window** under **Browser in a container** in **Settings › Containers**. At a terminal:
|
|
214
|
+
|
|
195
215
|
```yaml
|
|
196
216
|
browser:
|
|
197
217
|
provider: docker # or per run: --browser-provider docker
|
|
@@ -203,19 +223,17 @@ containers:
|
|
|
203
223
|
|
|
204
224
|
- **One container per use:** each browser run (a suite runs `suite.parallel` at once) gets its own, and a coding job
|
|
205
225
|
gets one that its replay and live browser share. Each is removed when its run or job ends.
|
|
206
|
-
- **Connection:**
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
the live browser's MCP server through the environment, never a file or a command line.
|
|
211
|
-
- **Visible or headless:** a visible browser runs on Xvfb inside the container. Sites that turn headless browsers
|
|
226
|
+
- **Connection:** the browser in the container accepts a connection only with a random token that ForgeQE makes for
|
|
227
|
+
that container, and only from this machine (its port is published on 127.0.0.1 only). The token is never written to
|
|
228
|
+
a file or a command line.
|
|
229
|
+
- **Visible or headless:** a visible browser runs on a virtual display inside the container. Sites that turn headless browsers
|
|
212
230
|
away see an ordinary one, but you do not see it on your screen. Runs keep screenshots and traces as usual.
|
|
213
231
|
- **Reaching the app:** the container joins the project network, so a declared service is reached by its name
|
|
214
232
|
(`http://order-api:8080`). An app this machine serves is `http://host.docker.internal:<port>`; `localhost` is the
|
|
215
233
|
container itself, and ForgeQE warns when a run starts there.
|
|
216
|
-
- **Replay:** one pass, in a new browser context. The second pass
|
|
217
|
-
|
|
218
|
-
- A run explored in a container is replayed in one even when the provider is changed back later
|
|
234
|
+
- **Replay:** one pass, in a new browser context. The second pass that replay tries on this machine (a browser that
|
|
235
|
+
looks less automated) needs a fresh browser start, which a container's running browser does not have.
|
|
236
|
+
- A run explored in a container is replayed in one even when the provider is changed back later.
|
|
219
237
|
|
|
220
238
|
## Testcontainers (Quill)
|
|
221
239
|
|
|
@@ -227,34 +245,36 @@ repository: the tests start and stop them, wherever they run.
|
|
|
227
245
|
|
|
228
246
|
## Mocks
|
|
229
247
|
|
|
230
|
-
|
|
248
|
+
Ask ForgeQE's agent for a mock (in a web chat, `forgeqe start` or `forgeqe run`). It builds WireMock stubs and runs
|
|
249
|
+
WireMock on a free port of 127.0.0.1:
|
|
231
250
|
|
|
232
|
-
- **From a run** (the default: the latest run, or
|
|
251
|
+
- **From a run** (the default: the latest run, or one you name):
|
|
233
252
|
- One stub per method, path and query of the app's own API calls, answering with the last status, content type
|
|
234
253
|
and body the app got.
|
|
235
|
-
- Other sites' calls are left out unless
|
|
254
|
+
- Other sites' calls are left out unless you ask for them.
|
|
236
255
|
- Failed calls are left out.
|
|
237
256
|
- Answers that were cut when recorded are listed under `skipped`.
|
|
238
|
-
- **From a description** (
|
|
257
|
+
- **From a description** (OpenAPI 3 or Swagger 2, a link or a file):
|
|
239
258
|
- One stub per REST operation.
|
|
240
259
|
- Each stub answers with the operation's first success status and a body from the schema's examples, or values
|
|
241
260
|
made from its types.
|
|
242
261
|
- A path parameter (`/orders/{id}`) matches any one path segment.
|
|
243
|
-
- Instead of a description, you can
|
|
262
|
+
- Instead of a description, you can name a saved API contract set.
|
|
244
263
|
- **GraphQL, SOAP and gRPC** are listed under `skipped`, not mocked.
|
|
245
264
|
|
|
246
|
-
A
|
|
265
|
+
A description given as a link is fetched by ForgeQE itself, with no credentials. The stubs are written to `.forgeqe/mocks/<name>/mappings/`. You can read and edit them there. The folder is mounted
|
|
247
266
|
read-only at `/home/wiremock/mappings`. WireMock runs with `--enable-stub-cors`, so a web app on another local port
|
|
248
267
|
can call it.
|
|
249
268
|
|
|
250
|
-
|
|
269
|
+
Ask for an API app of env.yaml to use the mock ("point order-api at it"), and the active environment's API app points
|
|
270
|
+
at the mock for the rest of the session. That
|
|
251
271
|
covers the API tools, and the tests ForgeQE runs, which read `FORGEQE_APP_<APP>_URL`. env.yaml itself is not
|
|
252
272
|
changed.
|
|
253
273
|
|
|
254
274
|
## Lifetime
|
|
255
275
|
|
|
256
|
-
- **Services and mocks the agent starts** are removed when the
|
|
257
|
-
|
|
276
|
+
- **Services and mocks the agent starts** are removed when the chat session (`forgeqe start`, `forgeqe web`'s chat,
|
|
277
|
+
`forgeqe run`, or `forgeqe mcp`) ends, as are the workspace and browser containers. The home volume stays.
|
|
258
278
|
- **`forgeqe services up`** keeps its services running after the command ends, until `forgeqe services down`.
|
|
259
279
|
- **Container names** are `forgeqe-<project>-<service>`. `<project>` is a hash of the project folder, so two projects
|
|
260
280
|
never share a container. Starting a service replaces its earlier container. Removing a container also removes the anonymous volumes its image declares (a database's data folder), so nothing is left on the machine. A container is never reused with old
|
|
@@ -268,10 +288,11 @@ ForgeQE's agent reads text other people control: tickets, web pages, repositorie
|
|
|
268
288
|
text could mount the whole disk or run privileged, so:
|
|
269
289
|
|
|
270
290
|
- **No commands from the model.** The agent names services that forgeqe.yaml declares, and ForgeQE builds the
|
|
271
|
-
|
|
272
|
-
- **The same restrictions for every container:**
|
|
273
|
-
|
|
274
|
-
- **Mounts are checked like uploads** (except a mock's stubs folder, which ForgeQE writes itself and mounts read-only).
|
|
291
|
+
command itself, without a shell. Images, flags and mounts never come from a request.
|
|
292
|
+
- **The same restrictions for every container:** no privilege gain, a process limit, ports on 127.0.0.1, and
|
|
293
|
+
read-only mounts. There is no setting to turn these off.
|
|
294
|
+
- **Mounts are checked like uploads** (except a mock's stubs folder, which ForgeQE writes itself and mounts read-only).
|
|
295
|
+
The real path, links followed, must be inside the project. A mount
|
|
275
296
|
that is or holds a hidden file or folder (`.env`, `.git`, `.npmrc`), a file named like a key (`*.pem`, `id_rsa`,
|
|
276
297
|
`llms.json`) or a link is refused. A container can send what it reads anywhere.
|
|
277
298
|
- **Environment:**
|
|
@@ -280,26 +301,5 @@ text could mount the whole disk or run privileged, so:
|
|
|
280
301
|
- A container gets only its `env` and `secrets`.
|
|
281
302
|
- Logs and errors have secret values replaced with `***`.
|
|
282
303
|
- **Not in the agents' shell:** `docker`, `podman`, `nerdctl`, `docker-compose` and `podman-compose` are denied in the
|
|
283
|
-
shell of ForgeQE's agent and of Quill. So the only way to start a container is
|
|
284
|
-
- **Asked first:**
|
|
285
|
-
|
|
286
|
-
## Code
|
|
287
|
-
|
|
288
|
-
| File | Contents |
|
|
289
|
-
|---|---|
|
|
290
|
-
| `src/containers/config.ts` | `containers:` in forgeqe.yaml: services, images, ports, env, secrets, mounts, ready checks |
|
|
291
|
-
| `src/containers/run.ts` | The runtime (docker or podman), `run` arguments, mount and secret checks, start and wait, status, logs, stop, the session's containers |
|
|
292
|
-
| `src/containers/mock.ts` | WireMock stubs from run traffic and from contract sets; values from JSON schemas |
|
|
293
|
-
| `src/containers/compose.ts` | docker-compose files as services: what is translated, ignored, left out or refused |
|
|
294
|
-
| `src/containers/tests.ts` | `run_tests` in a container: arguments, environment, mounts, output, browsers from `docker top` |
|
|
295
|
-
| `src/containers/workspace.ts` | `containers.workspace`: the container, its home volume, the agent's shell script, its test runner |
|
|
296
|
-
| `src/containers/active.ts` | The registered workspaces, by repository: `runTestCommand` and `openSession` look them up |
|
|
297
|
-
| `src/containers/masks.ts` | The repository's credential files and folders, covered in every container that mounts it |
|
|
298
|
-
| `src/containers/browser.ts` | `browser.provider: docker`: the browser container, its token gateway, the endpoint |
|
|
299
|
-
| `src/containers/command.ts` | `forgeqe services` |
|
|
300
|
-
| `skills/testcontainers/SKILL.md` | Quill's Testcontainers skill |
|
|
301
|
-
| `src/mcp/containertools.ts` | The agent's `services` and `mock_service` |
|
|
302
|
-
|
|
303
|
-
Tests: `bun test tests/containers.test.ts tests/workspace.test.ts`, which use a fake runtime that records each command
|
|
304
|
-
(`workspace.test.ts` also runs the gateway against a stand-in browser, and the agent runtime against the workspace's
|
|
305
|
-
script). `tests/containers.live.test.ts` uses real Docker.
|
|
304
|
+
shell of ForgeQE's agent and of Quill. So the only way for an agent to start a container is through ForgeQE.
|
|
305
|
+
- **Asked first:** the agent asks you before it starts services or a mock, as it does before running tests.
|
|
@@ -1,88 +1,138 @@
|
|
|
1
1
|
# Custom agents: a first real run
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
step names where to look.
|
|
3
|
+
This checklist runs a custom agent for real once, in your project, with your model and your systems, so you see each
|
|
4
|
+
part work before your team relies on it. It takes about 30 minutes. Each step says what you should see; if you see
|
|
5
|
+
something else, the step names where to look.
|
|
7
6
|
|
|
8
7
|
Use a test environment (QA or staging) for everything except step 7, and a project you can make a test change in.
|
|
9
8
|
|
|
10
9
|
## 0. Before you start
|
|
11
10
|
|
|
11
|
+
**Checking this computer.** You should see a live model and everything ForgeQE downloads as ready.
|
|
12
|
+
|
|
13
|
+
**Web app**
|
|
14
|
+
|
|
15
|
+
1. Open **Settings › Set up** and check that nothing is missing.
|
|
16
|
+
2. In **Settings › Agents**, under **Custom agents**, check that **Custom agents on** is on.
|
|
17
|
+
|
|
18
|
+
**Terminal**
|
|
19
|
+
|
|
12
20
|
```bash
|
|
13
21
|
forgeqe doctor
|
|
14
22
|
```
|
|
15
23
|
|
|
16
|
-
|
|
17
|
-
agents, "Custom agents on" (or no `custom_agents: { enabled: false }` in `forgeqe.yaml`).
|
|
24
|
+
Custom agents are on unless `forgeqe.yaml` has `custom_agents: { enabled: false }`.
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
**What steps 5 and 6 need.** Azure DevOps or Jira set up (**Settings › Integrations**) and one defect you may comment
|
|
27
|
+
on.
|
|
20
28
|
|
|
21
29
|
## 1. Build an agent with the builder (the model's questions and plan)
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```
|
|
31
|
+
In the web app only: the builder is a page of `forgeqe web`. (At a terminal, `forgeqe agent new defect-retest` makes a
|
|
32
|
+
draft from the same starter, without the model's questions.)
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
1. Run `forgeqe web` and open **Make an agent** (or **New agent** on **Custom agents**).
|
|
35
|
+
2. Pick the **Defect retest** starter, change it if you like, and send it.
|
|
28
36
|
|
|
29
37
|
You should see:
|
|
30
38
|
|
|
31
|
-
-
|
|
39
|
+
- **Understand** written by the model (the page says it was worked out by ForgeQE's model, not its rules), restating the
|
|
32
40
|
goal in one sentence, with the environment and schedule filled in and at most two questions about the job itself.
|
|
33
41
|
It never picks production unless you named it.
|
|
34
|
-
-
|
|
42
|
+
- **Plan**: 3 to 6 steps in order, each saying what it uses, why, and what the agent could not do without it. Only
|
|
35
43
|
capabilities and systems your project has.
|
|
36
|
-
-
|
|
37
|
-
-
|
|
44
|
+
- **Boundaries**: least privilege first. Asking before each run is on; changing other systems asks first.
|
|
45
|
+
- **Review**: a name ending in "agent", a one-line description, instructions, a first request.
|
|
38
46
|
|
|
39
|
-
If the page says the steps were worked out by its rules, the model did not answer usably: check
|
|
40
|
-
model's sign-in. Save it as a draft.
|
|
47
|
+
If the page says the steps were worked out by its rules, the model did not answer usably: check **Settings › Set up**
|
|
48
|
+
(or `forgeqe doctor`) and the model's sign-in. Press **Save** to keep it as a draft.
|
|
41
49
|
|
|
42
50
|
## 2. Try it
|
|
43
51
|
|
|
44
|
-
|
|
52
|
+
**Web app**
|
|
45
53
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
54
|
+
On the agent's page, type a request in the box ("Ask … to…") and send it.
|
|
55
|
+
|
|
56
|
+
**Terminal**
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
forgeqe agent try <id> "Retest defect 1234"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**What you should see.** It asks you before each run (a try always does), works only in its environments, and its run
|
|
63
|
+
is listed under **Recent runs** with every tool call and the policy's decision. A call it may not make is refused with
|
|
64
|
+
a reason, never worked around.
|
|
49
65
|
|
|
50
66
|
## 3. Approve it
|
|
51
67
|
|
|
68
|
+
**Web app**
|
|
69
|
+
|
|
70
|
+
1. On the agent's page, press **Details**.
|
|
71
|
+
2. Under its versions, press **Approve**.
|
|
72
|
+
3. Type the agent's id to confirm, and press **Approve**.
|
|
73
|
+
|
|
74
|
+
**Terminal**
|
|
75
|
+
|
|
52
76
|
```bash
|
|
53
|
-
forgeqe agent approve <id>
|
|
77
|
+
forgeqe agent approve <id> # type the id to confirm
|
|
54
78
|
```
|
|
55
79
|
|
|
56
|
-
|
|
80
|
+
**What you should see.** The page shows it Active, with version 1.0.0. Commit `.forgeqe/agents` so your team has it.
|
|
57
81
|
|
|
58
82
|
## 4. Ask it from Atlas
|
|
59
83
|
|
|
60
|
-
In a new chat (web or `forgeqe`), ask: "Ask the defect retest agent to retest
|
|
84
|
+
In a new chat (**New chat** in the web app, or `forgeqe start`), ask: "Ask the defect retest agent to retest
|
|
85
|
+
yesterday's resolved defects".
|
|
61
86
|
|
|
62
|
-
You should see Atlas hand it over
|
|
63
|
-
|
|
87
|
+
You should see Atlas hand it over, the agent's questions come to you in the same chat, and the reply come back. Its run
|
|
88
|
+
shows "From Atlas" in its history.
|
|
64
89
|
|
|
65
90
|
## 5. Another system: a read and a change
|
|
66
91
|
|
|
67
92
|
Ask it to read one defect, then to add a comment to it.
|
|
68
93
|
|
|
69
94
|
You should see the read go ahead without asking, and the comment asked first ("Let … change …?"), unless you turned
|
|
70
|
-
asking off for changes to other systems. Check the comment is on the defect.
|
|
71
|
-
|
|
95
|
+
asking off for changes to other systems. Check the comment is on the defect.
|
|
96
|
+
|
|
97
|
+
If the system's tools do not appear, check **Settings › Integrations**, and what the agent may reach (**Details** on
|
|
98
|
+
its page, or `forgeqe agent check <id>`). A refused sign-in says to check the credential.
|
|
72
99
|
|
|
73
100
|
## 6. On a schedule, with nobody watching
|
|
74
101
|
|
|
75
|
-
|
|
76
|
-
|
|
102
|
+
**Giving it a schedule.** Then approve the new version (step 3).
|
|
103
|
+
|
|
104
|
+
**Web app**
|
|
105
|
+
|
|
106
|
+
1. On the agent's page, press **Edit**.
|
|
107
|
+
2. Under **Runs by itself**, set **When** to every day (`1d`).
|
|
108
|
+
3. Press **Save**.
|
|
109
|
+
|
|
110
|
+
**Terminal**
|
|
111
|
+
|
|
112
|
+
Set `schedule:` in its manifest (`.forgeqe/agents/<id>.yaml`).
|
|
113
|
+
|
|
114
|
+
**Running what the schedule runs, now.** This is done at a terminal only:
|
|
77
115
|
|
|
78
116
|
```bash
|
|
79
117
|
forgeqe agent run <id> --unattended "Retest the defects resolved yesterday"
|
|
80
118
|
```
|
|
81
119
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
120
|
+
**What you should see.** What it may do alone goes ahead, and anything else waits for a person: the team's channel is
|
|
121
|
+
told, and the Agents page says a request is waiting. Starting a second unattended run while the first waits says
|
|
122
|
+
another is still going.
|
|
123
|
+
|
|
124
|
+
**Answering a waiting request.**
|
|
125
|
+
|
|
126
|
+
**Web app**
|
|
127
|
+
|
|
128
|
+
On the agent's page, press **Allow**, **Allow run** (for the rest of this run) or **Deny**.
|
|
129
|
+
|
|
130
|
+
**Terminal**
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
forgeqe agent approvals <id> # what it waits on
|
|
134
|
+
forgeqe agent approvals <id> <approval> allow # or deny; type to confirm
|
|
135
|
+
```
|
|
86
136
|
|
|
87
137
|
## 7. Production (optional, with care)
|
|
88
138
|
|
|
@@ -94,23 +144,55 @@ step that could reach real customers it asks you itself.
|
|
|
94
144
|
|
|
95
145
|
## 8. Turn it off and on
|
|
96
146
|
|
|
97
|
-
|
|
98
|
-
|
|
147
|
+
**Web app**
|
|
148
|
+
|
|
149
|
+
1. On **Custom agents**, press **Select agents** and pick it.
|
|
150
|
+
2. Press **Disable** and type 1 to confirm.
|
|
151
|
+
|
|
152
|
+
**Terminal**
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
forgeqe agent disable <id>
|
|
156
|
+
forgeqe agent enable <id>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**What you should see.** Ask Atlas to use it: it is refused. Enable it again. Then turn **Custom agents on** off in
|
|
160
|
+
**Settings › Agents** (or set `custom_agents: { enabled: false }`): the builder is closed and nothing runs. Turn it back
|
|
161
|
+
on.
|
|
99
162
|
|
|
100
163
|
## 9. The record
|
|
101
164
|
|
|
102
|
-
|
|
103
|
-
|
|
165
|
+
It holds its approvals, every run with each tool call and decision, and every answered question.
|
|
166
|
+
|
|
167
|
+
**Web app**
|
|
168
|
+
|
|
169
|
+
On the agent's page, under **Recent runs**, press **Download**.
|
|
170
|
+
|
|
171
|
+
**Terminal**
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
forgeqe agent export <id> --out record.jsonl
|
|
175
|
+
```
|
|
104
176
|
|
|
105
177
|
## 10. Share with another project
|
|
106
178
|
|
|
107
179
|
For the same repository, commit `.forgeqe/agents` (and its `.releases` after you approve) so your team has it.
|
|
108
180
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
181
|
+
**Handing an agent to another project or machine.** The zip holds `agent.json` plus the real knowledge files and
|
|
182
|
+
project skill folders it names (`knowledge/…`, `skills/<name>/SKILL.md`). It always arrives as a **draft**: edit, try,
|
|
183
|
+
then approve. Environments and systems are not in the package: they must already exist in the target project.
|
|
184
|
+
|
|
185
|
+
**Web app**
|
|
186
|
+
|
|
187
|
+
1. On the agent's page, press **Export to share**.
|
|
188
|
+
2. On the other side, open **Custom agents** and press **Import agent**.
|
|
189
|
+
|
|
190
|
+
**Terminal**
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
forgeqe agent pack <id> --out <id>.forgeqe-agent.zip
|
|
194
|
+
forgeqe agent import <file.zip> [--id new-id] # on the other side
|
|
195
|
+
```
|
|
114
196
|
|
|
115
197
|
## What to send back
|
|
116
198
|
|
package/docs/DESKTOP-CI.md
CHANGED
|
@@ -16,9 +16,23 @@ Azure DevOps agents and Jenkins nodes.
|
|
|
16
16
|
| The machine slept or the screen turned off | Input and screenshots stop | Power plan: never sleep, never turn off the screen |
|
|
17
17
|
| After a restart nobody signs in | No session at all | Sysinternals Autologon |
|
|
18
18
|
|
|
19
|
-
Before each replay or explore,
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
Before each replay or explore, ForgeQE checks the session. On a session it cannot drive, the run fails at once with the
|
|
20
|
+
reason, instead of timing out step by step.
|
|
21
|
+
|
|
22
|
+
**Checking the machine.** The same check can be run by hand, or from a job before the suite.
|
|
23
|
+
|
|
24
|
+
**Web app**
|
|
25
|
+
|
|
26
|
+
1. Open **Desktop apps** and the **Machine and apps** tab.
|
|
27
|
+
2. Press **Check**.
|
|
28
|
+
|
|
29
|
+
**Terminal**
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
forgeqe desktop doctor
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**What the check prints.** At a terminal it looks like this:
|
|
22
36
|
|
|
23
37
|
```text
|
|
24
38
|
engine ready (C:\Users\qa\.forgeqe\desktop\.venv\Scripts\python.exe)
|
|
@@ -85,3 +99,4 @@ listed in `desktop.secrets` or the environment's `secrets` in `env.yaml`. Pick t
|
|
|
85
99
|
Healing calls the model. In a nightly run, either give the job the model's key so moved controls are healed and
|
|
86
100
|
reported in `heals.json` (never written into the workflow without `--accept-heals`), or pass `--no-heal` so a moved
|
|
87
101
|
control fails the run.
|
|
102
|
+
|