@capagents/forgeqe 2.3.12 → 2.3.14
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 +10 -2
- package/dist/forgeqe.js +930 -925
- package/docs/user-guide.html +73 -2
- package/package.json +1 -1
package/docs/user-guide.html
CHANGED
|
@@ -728,6 +728,12 @@ Add a GitHub Actions workflow that runs tests/cases.yaml on every PR, and make i
|
|
|
728
728
|
<tr><td><code>/runs</code>, <code>/reports</code></td><td>The runs and reports in the reports folder, newest first</td></tr>
|
|
729
729
|
<tr><td><code>/jobs</code></td><td>The scheduled jobs: when each runs next, and how its last run ended</td></tr>
|
|
730
730
|
<tr><td><code>/knowledge</code></td><td>The product knowledge the agents read (<code>.forgeqe/knowledge</code>)</td></tr>
|
|
731
|
+
<tr><td><code>/memory</code></td><td>Page memory: the sites and pages ForgeQE remembers, and their flows</td></tr>
|
|
732
|
+
<tr><td><code>/guardrails</code></td><td>The rules every agent follows here</td></tr>
|
|
733
|
+
<tr><td><code>/doctor</code></td><td>Check what ForgeQE needs: programs, sign-ins, and the services it reaches</td></tr>
|
|
734
|
+
<tr><td><code>/settings</code></td><td><code>forgeqe.yaml</code>: where it is and what it sets, opened to edit</td></tr>
|
|
735
|
+
<tr><td><code>/home</code></td><td>Back to the start screen; the session stays</td></tr>
|
|
736
|
+
<tr><td><code>/docs</code></td><td>The user guide</td></tr>
|
|
731
737
|
<tr><td><code>/generated</code></td><td>How much of this repository's code ForgeQE wrote, and how much is still there</td></tr>
|
|
732
738
|
<tr><td><code>/init</code></td><td>Set ForgeQE up in this folder: <code>forgeqe.yaml</code>, <code>llms.json</code>, editable prompts, skills, knowledge</td></tr>
|
|
733
739
|
<tr><td><code>/skills [name]</code></td><td>The skills each agent can use, or one skill's instructions</td></tr>
|
|
@@ -826,8 +832,9 @@ Add a GitHub Actions workflow that runs tests/cases.yaml on every PR, and make i
|
|
|
826
832
|
</tbody>
|
|
827
833
|
</table></div>
|
|
828
834
|
<p><strong>Links.</strong> Report folders, report files, and web addresses in the chat are links: Cmd-click (Ctrl-click on Windows and Linux) opens them in terminals that support links, such as VS Code, iTerm2, Windows Terminal, and recent GNOME Terminal. A path that no longer exists stays plain text.</p>
|
|
829
|
-
<p><strong>Setup checklist.</strong> Until everything is set up, the start screen shows how many of the five things most features rest on are set up: <strong>Model</strong> (a live model profile), <strong>Coding agent</strong>, <strong>Work items</strong> (Azure DevOps, Jira, TestRail, Zephyr, qTest, or Xray), <strong>Domain</strong>, and <strong>Notifications</strong>. In a terminal 110 columns or wider it is the sidebar's <strong>Get set up</strong>: each finished item with what it found, and the next one as a card
|
|
830
|
-
<p><strong>Sidebar.</strong>
|
|
835
|
+
<p><strong>Setup checklist.</strong> Until everything is set up, the start screen shows how many of the five things most features rest on are set up: <strong>Model</strong> (a live model profile), <strong>Coding agent</strong>, <strong>Work items</strong> (Azure DevOps, Jira, TestRail, Zephyr, qTest, or Xray), <strong>Domain</strong>, and <strong>Notifications</strong>. In a terminal 110 columns or wider it is the sidebar's <strong>Get set up</strong>: each finished item with what it found, and the next one as a card with <strong>▸ Set up</strong> (its steps in the chat; for <strong>Work items</strong>, it runs <code>/auth</code>) and <strong>skip</strong>. A skipped item is kept in <code>.forgeqe/setup.json</code> and not asked about again. Narrower, it is one <strong>Setup</strong> line with <strong>▸ how to set up</strong> and <strong>skip</strong>. The checks are the same ones <code>/features</code> uses, so the two always agree.</p>
|
|
836
|
+
<p><strong>Sidebar and rail.</strong> The sidebar has three groups. <strong>Work</strong>: <strong>Home</strong>, <strong>This session</strong> (once you have asked something), <strong>Runs</strong>, <strong>Reports</strong>, <strong>Jobs</strong>, and <strong>Defects</strong> (with a tracker set up). <strong>Knowledge</strong>: <strong>Page memory</strong>, <strong>Test cases</strong> (with a tracker), <strong>Guardrails</strong>, <strong>Product</strong> (the knowledge files) and <strong>Skills</strong>. <strong>System</strong>: <strong>Models</strong>, <strong>Sign in</strong>, <strong>Environments</strong>, <strong>Doctor</strong>, <strong>Settings</strong>, <strong>Help</strong> and <strong>Docs</strong>. Each shows how many there are and opens its list (<code>/runs</code>, <code>/reports</code>, <code>/jobs</code>, <code>/memory</code>, <code>/guardrails</code>, <code>/knowledge</code>, <code>/skills</code>, <code>/doctor</code>, <code>/settings</code>, <code>/help</code>, <code>/docs</code>); <strong>Defects</strong> and <strong>Test cases</strong> put a request in the composer, since the agent reads them from the tracker. Narrower than 110 columns, and beside the chat at every width, the sidebar folds to a rail of its icons, so the start screen is always one click away: <strong>Home</strong> (or <code>/home</code>) shows it with the session still open, and <strong>▸ Back to the session</strong> or any request returns to it.</p>
|
|
837
|
+
<p><strong>Needs you and Today.</strong> Once there are runs, the start screen shows what needs you (runs that failed this week and have not passed since, and jobs whose last run failed, each with <strong>open</strong> and <strong>rerun</strong>) and what ran today. The greeting says how many runs there were today and how many failed. The model is in the composer beside <strong>⏎ Send</strong>: click it to change it. The status line shows the branch, the tracker, and when the next scheduled job runs.</p>
|
|
831
838
|
<p><strong>Command palette.</strong> Ctrl-P opens a palette of every action, command, profile, and example request; type a few letters to find one ("rr" finds <em>Refine my request</em>, "auth" finds the sign-in commands), ↑/↓ to choose, Enter to run it. Example requests are put in the prompt for you to edit, never sent straight away.</p>
|
|
832
839
|
<p><strong><code>/</code> and <code>@</code> in the prompt.</strong> Typing <code>/</code> lists the commands that match; typing <code>@</code> suggests references: recent runs (<em>last run</em>, then each by its folder), files in the repository by name or path (<code>@Login</code> finds <code>pages/Login.ts</code>), and, after <code>@</code> and a number such as <code>@1761</code>, the Azure DevOps work item with its title (read-only). Tab completes, ↑/↓ choose, Esc closes the list.</p>
|
|
833
840
|
<p><strong>Refine.</strong> Ctrl-R (or <em>Refine my request</em> in the palette) turns what you typed into a task specification for ForgeQE's agent, laid out as a system prompt and written in ASD-STE100 Simplified Technical English, before it is sent. It has these parts, in this order: <strong>Role</strong> (who the agent acts as), <strong>Objective</strong> (one instruction), <strong>Context</strong> (the facts, with names), <strong>Steps</strong> (only when they add something), <strong>Rules</strong> (your limits and the setup's), <strong>Output format</strong> (what comes back and how it is laid out), and <strong>Summary</strong> (what you get, in one sentence, read last):</p>
|
|
@@ -888,6 +895,69 @@ forgeqe run "Run the cases in smoke.yaml and don't post results" --pla
|
|
|
888
895
|
<li><code>failure.png</code>: last screenshot, only when the run failed</li>
|
|
889
896
|
</ul>
|
|
890
897
|
</div>
|
|
898
|
+
<section class="doc sub" id="doc-how_to_use-a-live-agent-for-programs-forgeqe-chat---jsonl"><h4>A live agent for programs (<code>forgeqe chat --jsonl</code>)</h4><div class="prose"><p>A program that needs what the shell has (one live agent per conversation, follow-ups, credentials remembered for the session, <strong>Your turn</strong> and questions, stop), such as a web UI or an IDE, starts <code>forgeqe chat --jsonl</code> and talks to it in JSON lines. It is the shell's agent and the shell's events, not a screen to scrape. ForgeQE serves no HTTP here: the program that starts the process owns transport, users, and sign-in.</p>
|
|
899
|
+
<pre><code class="language-bash">forgeqe chat --jsonl [--repo DIR | --no-code] [--profile NAME] [--url URL] [--headed]
|
|
900
|
+
[--browser-provider local|docker|browserstack|testmu] [--devices a,b] [--max-steps N]
|
|
901
|
+
[--replay MODE] [--no-memory] [--carry-over FILE] [--config forgeqe.yaml] [--verbose] [--debug]
|
|
902
|
+
</code></pre>
|
|
903
|
+
<p>The flags mean what they mean for <code>forgeqe run</code> and <code>forgeqe start</code>. <code>--jsonl</code> is required (the only format so far). <code>--carry-over FILE</code> is a JSON list <code>[{"user": "...", "reply": "..."}, ...]</code>: the turns of an earlier conversation whose process has gone (a server closing idle chats). The first message then reaches the agent with those turns before it, as when you switch profiles in the shell. To change profiles, start a new process with <code>--profile</code> and <code>--carry-over</code>. <code>--verbose</code> also writes readable event lines to stderr.</p>
|
|
904
|
+
<p>The process opens ForgeQE's agent on the first message and keeps it for every later one; it ends it on <code>close</code>, the end of stdin, or a signal. It works like the shell: background monitors are allowed and stop when it exits, and passed runs become tests unless <code>--no-code</code>. A request that was run before and passed is run again as recorded, without the agent, as in the shell (Tier 0, <code>registry.mode</code>); its turn ends with the result as the reply. When the agent cannot run (no model, no agent runtime), the process writes <code>fatal</code> and exits 1 before it reads anything: it never falls back to a browser goal.</p>
|
|
905
|
+
<p><strong>stdout</strong> carries only JSON lines: one object per line, UTF-8, ending in <code>\n</code>. Logs, warnings, and anything a library prints go to stderr. Lines can be long (a card, a suite result); do not assume a maximum length. Every line has <code>"v": 1</code>, <code>"seq"</code> (1, 2, 3, … in this process), and <code>"t"</code> (ISO time). Every string is passed through the session's secret redaction, so a password given in a message never comes back out, not even inside a tool result; profile keys and the values of ForgeQE's own secret variables never appear.</p>
|
|
906
|
+
<p><strong>Input</strong> (stdin), one JSON object per line:</p>
|
|
907
|
+
<div class="tbl"><table>
|
|
908
|
+
<thead>
|
|
909
|
+
<tr><th><code>type</code></th><th>Fields</th><th>Meaning</th></tr>
|
|
910
|
+
</thead>
|
|
911
|
+
<tbody>
|
|
912
|
+
<tr><td><code>message</code></td><td><code>id</code> (your turn id), <code>text</code></td><td>A new user message. Refused with <code>error</code> <code>busy</code> while a turn runs</td></tr>
|
|
913
|
+
<tr><td><code>answer</code></td><td><code>id</code> (from an <code>ask</code>), <code>choice</code> (an option id, or <code>null</code> to cancel)</td><td>Answers the pending question</td></tr>
|
|
914
|
+
<tr><td><code>continue</code></td><td><code>id</code> (from a <code>wait</code>), <code>ok</code> (<code>true</code> = Done, continue; <code>false</code> = Cancel)</td><td>Ends the pending wait</td></tr>
|
|
915
|
+
<tr><td><code>stop</code></td><td></td><td>Stops the running turn (Esc or <code>/stop</code> in the shell). Nothing when idle</td></tr>
|
|
916
|
+
<tr><td><code>close</code></td><td></td><td>Stops any turn, closes the agent, stops monitors and the containers it started, writes <code>closed</code>, exits 0</td></tr>
|
|
917
|
+
</tbody>
|
|
918
|
+
</table></div>
|
|
919
|
+
<p>A line that is not JSON, has an unknown <code>type</code>, or misses a field gets <code>error</code> <code>bad_input</code> with the reason and the first 200 characters of the line; the process goes on. The end of stdin is the same as <code>close</code>.</p>
|
|
920
|
+
<p><strong>Output</strong> (stdout):</p>
|
|
921
|
+
<div class="tbl"><table>
|
|
922
|
+
<thead>
|
|
923
|
+
<tr><th><code>type</code></th><th>Fields</th><th>When</th></tr>
|
|
924
|
+
</thead>
|
|
925
|
+
<tbody>
|
|
926
|
+
<tr><td><code>ready</code></td><td><code>protocol</code> (1), <code>version</code>, <code>cwd</code>, <code>writeTests</code>, <code>profile</code> (<code>name</code> and <code>provider</code>, never a key)</td><td>Once, after the config is loaded and checked, before stdin is read</td></tr>
|
|
927
|
+
<tr><td><code>turn_start</code></td><td><code>id</code></td><td>A message was accepted</td></tr>
|
|
928
|
+
<tr><td><code>agent</code></td><td><code>id</code>, <code>event</code>: a <code>CodeEvent</code> (<code>stream</code>, <code>say</code>, <code>start</code>, <code>tool</code>, <code>plan</code>, <code>usage</code>, <code>context</code>, <code>test</code>, <code>info</code>, …)</td><td>While the turn runs</td></tr>
|
|
929
|
+
<tr><td><code>tool</code></td><td><code>id</code>, <code>event</code>: a <code>ToolEvent</code> (<code>run-start</code>, <code>run-event</code>, <code>run-done</code>, <code>suite-*</code>, <code>card</code>, <code>info</code>, <code>agent</code>, <code>code-*</code>, …)</td><td>While the turn runs; <code>id</code> is <code>null</code> for a background monitor between turns</td></tr>
|
|
930
|
+
<tr><td><code>ask</code></td><td><code>id</code> (<code>ask-N</code>), <code>turn</code>, <code>question</code> (<code>title</code>, <code>detail</code>, <code>lines</code>, <code>options[{id, label}]</code>)</td><td>A tool asks you to choose</td></tr>
|
|
931
|
+
<tr><td><code>wait</code></td><td><code>id</code> (<code>wait-N</code>), <code>turn</code>, <code>prompt</code></td><td>A tool waits for you to do something by hand</td></tr>
|
|
932
|
+
<tr><td><code>turn_done</code></td><td><code>id</code>, <code>outcome</code> (<code>done</code>, <code>failed</code>, <code>needs_input</code>, <code>stopped</code>), <code>reply</code> (the visible reply), <code>next</code> (follow-ups), <code>error</code> (when there is one), <code>usage</code> (the agent's usage so far, <code>null</code> before it opened)</td><td>The turn ended, whatever the way</td></tr>
|
|
933
|
+
<tr><td><code>error</code></td><td><code>code</code> (<code>bad_input</code>, <code>busy</code>, <code>unknown_id</code>, <code>internal</code>), <code>message</code>, <code>turn</code> (when one runs)</td><td>A problem that does not end the process</td></tr>
|
|
934
|
+
<tr><td><code>fatal</code></td><td><code>message</code></td><td>The process cannot go on; exit code 1 follows</td></tr>
|
|
935
|
+
<tr><td><code>closed</code></td><td></td><td>The last line before a clean exit</td></tr>
|
|
936
|
+
</tbody>
|
|
937
|
+
</table></div>
|
|
938
|
+
<p><code>CodeEvent</code> and <code>ToolEvent</code> are passed through as they are: their types in <code>src/types.ts</code> and <code>src/mcp/tools.ts</code> are the contract. Rules:</p>
|
|
939
|
+
<ul>
|
|
940
|
+
<li>Every turn that got <code>turn_start</code> gets exactly one <code>turn_done</code>, also after an error (<code>outcome: "failed"</code> with the <code>error</code>).</li>
|
|
941
|
+
<li>One <code>ask</code> and one <code>wait</code> can be pending at a time. <code>answer</code> or <code>continue</code> with an id that is not pending gets <code>error</code> <code>unknown_id</code>, and nothing else happens.</li>
|
|
942
|
+
<li><code>stop</code> and <code>close</code> answer a pending <code>ask</code> with <code>null</code> and a pending <code>wait</code> with <code>false</code>, then stop the turn, which ends with <code>turn_done</code> <code>stopped</code>.</li>
|
|
943
|
+
<li>If the agent fails to start on a message, that turn ends <code>failed</code> with the error, and the next message tries again.</li>
|
|
944
|
+
<li>Exit codes: 0 after <code>closed</code>, 1 after <code>fatal</code>, 2 after SIGINT or SIGTERM (the turn is stopped and the agent closed first).</li>
|
|
945
|
+
</ul>
|
|
946
|
+
<p>A complete exchange (<code>→</code> stdout, <code>←</code> stdin; <code>t</code> left out):</p>
|
|
947
|
+
<pre><code class="language-text">→ {"v":1,"seq":1,"type":"ready","protocol":1,"version":"2.3.11","cwd":"/srv/studio/users/ana/workspace","writeTests":true,"profile":{"name":"copilot","provider":"github_copilot"}}
|
|
948
|
+
← {"type":"message","id":"m1","text":"Run SHOP-12 on staging"}
|
|
949
|
+
→ {"v":1,"seq":2,"type":"turn_start","id":"m1"}
|
|
950
|
+
→ {"v":1,"seq":3,"type":"agent","id":"m1","event":{"type":"code","kind":"stream","id":"p1","text":"I'll run SHOP-12"}}
|
|
951
|
+
→ {"v":1,"seq":4,"type":"agent","id":"m1","event":{"type":"code","kind":"start","text":"forgeqe_run_test_cases","tool":"forgeqe_run_test_cases","id":"c1"}}
|
|
952
|
+
→ {"v":1,"seq":5,"type":"tool","id":"m1","event":{"type":"run-start","goal":"SHOP-12: Checkout with a saved card"}}
|
|
953
|
+
→ {"v":1,"seq":6,"type":"ask","id":"ask-1","turn":"m1","question":{"title":"Which sprint?","options":[{"id":"s41","label":"Sprint 41"},{"id":"s42","label":"Sprint 42"}]}}
|
|
954
|
+
← {"type":"answer","id":"ask-1","choice":"s42"}
|
|
955
|
+
→ {"v":1,"seq":7,"type":"tool","id":"m1","event":{"type":"card","card":{"status":"passed","title":"SHOP-12","stats":[],"body":"Checkout with a saved card passed in 41 s."}}}
|
|
956
|
+
→ {"v":1,"seq":8,"type":"turn_done","id":"m1","outcome":"done","reply":"SHOP-12 passed on staging.","next":[{"label":"Write a test for it","request":"Write a test for SHOP-12"}],"usage":{"input":5200,"output":310}}
|
|
957
|
+
← {"type":"close"}
|
|
958
|
+
→ {"v":1,"seq":9,"type":"closed"}
|
|
959
|
+
</code></pre>
|
|
960
|
+
</div></section>
|
|
891
961
|
</section>
|
|
892
962
|
</section>
|
|
893
963
|
<section class="chapter" id="area-browser" aria-labelledby="area-browser-h">
|
|
@@ -1598,6 +1668,7 @@ Signing in stays <code>/auth</code> and <code>forgeqe login</code>; <code>forgeq
|
|
|
1598
1668
|
<tr><td><code>forgeqe start [--repo DIR] [--headed]</code></td><td>The shell</td></tr>
|
|
1599
1669
|
<tr><td><code>forgeqe run "<request>" [--plain]</code></td><td>One request without the shell</td></tr>
|
|
1600
1670
|
<tr><td><code>forgeqe run --direct "<goal>" [--skill NAME]</code></td><td>One browser goal, no agent</td></tr>
|
|
1671
|
+
<tr><td><code>forgeqe chat --jsonl [--carry-over FILE]</code></td><td>One live agent for a program, in JSON lines (see <a href="../HOW_TO_USE.md#a-live-agent-for-programs-forgeqe-chat---jsonl">A live agent for programs</a>)</td></tr>
|
|
1601
1672
|
<tr><td><code>forgeqe suite <source...> [--parallel N] [--skill NAME]</code></td><td>Run test cases the same way every time (pipelines)</td></tr>
|
|
1602
1673
|
<tr><td><code>forgeqe cases <source...></code></td><td>List the cases a source gives, without running them</td></tr>
|
|
1603
1674
|
<tr><td><code>forgeqe bi [build] [--from FILE|DIR]... [--static|--evidence]</code></td><td>The team report of every run here and the shared bundles (see <a href="#doc-how_to_use-team-report">Team report</a>)</td></tr>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capagents/forgeqe",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.14",
|
|
4
4
|
"description": "ForgeQE: a browser agent CLI that runs goals and test cases in local Chrome or Chromium, or BrowserStack and TestMu AI/LambdaTest when configured, and turns passing runs into tests in your repo",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|