@capagents/forgeqe 2.7.2 → 2.7.4

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.
Files changed (101) hide show
  1. package/HOW_TO_USE.md +1 -0
  2. package/THIRD_PARTY_NOTICES.md +23 -22
  3. package/bin/forgeqe.js +1 -1
  4. package/dist/docs-site/docs/architecture/index.html +1 -1
  5. package/dist/docs-site/docs/containers/index.html +1 -1
  6. package/dist/docs-site/docs/index.html +2 -1
  7. package/dist/docs-site/docs/search.js +1 -1
  8. package/dist/docs-site/docs/web-app/index.html +21 -7
  9. package/dist/forgeqe.js +1733 -1517
  10. package/dist/web/THIRD_PARTY_NOTICES.md +560 -0
  11. package/dist/web/assets/Agent-CKR9Py0r.js +4 -0
  12. package/dist/web/assets/ApiTests-CKcXHveu.js +10 -0
  13. package/dist/web/assets/{Chat-C6tALAzM.js → Chat-BEBubV0F.js} +3 -3
  14. package/dist/web/assets/CommandPalette-DsRNyIKF.js +1 -0
  15. package/dist/web/assets/{Data-IpXp3YB-.js → Data-CL-E93Vx.js} +3 -3
  16. package/dist/web/assets/Evidence-CKEitJv6.js +1 -0
  17. package/dist/web/assets/Features-CFkBiMMK.js +1 -0
  18. package/dist/web/assets/ForceGraph-B6eiz89z.js +1 -0
  19. package/dist/web/assets/Impact-Crjnn821.js +1 -0
  20. package/dist/web/assets/Jobs-DsSzuL4M.js +5 -0
  21. package/dist/web/assets/KindPage-BFV_XoQL.js +6 -0
  22. package/dist/web/assets/Migration-D9cSWkdV.js +2 -0
  23. package/dist/web/assets/Product-ColVwjaL.js +7 -0
  24. package/dist/web/assets/Product-DLioOiRN.css +1 -0
  25. package/dist/web/assets/Quality-zi5aA6f6.js +1 -0
  26. package/dist/web/assets/Record-CrN77nVE.js +2 -0
  27. package/dist/web/assets/Regression-CZrsQWbm.js +5 -0
  28. package/dist/web/assets/Reports-D7f_1vG0.js +2 -0
  29. package/dist/web/assets/Response-DC92GseN.js +4 -0
  30. package/dist/web/assets/Runs-nVIQRwQJ.js +2 -0
  31. package/dist/web/assets/Shell-D5MWlvjN.js +4 -0
  32. package/dist/web/assets/TestCases-BXOSmbVJ.js +1 -0
  33. package/dist/web/assets/TestData-BfaYdN7g.js +2 -0
  34. package/dist/web/assets/Tosca-DLEfDNnJ.js +2 -0
  35. package/dist/web/assets/WhatsNew-CT5wRl3k.js +1 -0
  36. package/dist/web/assets/dataParts-CBW6uN5d.js +3 -0
  37. package/dist/web/assets/families-D6BROXfa.js +1 -0
  38. package/dist/web/assets/index-C-NmeOas.css +2 -0
  39. package/dist/web/assets/index-mFIY4zqW.js +43 -0
  40. package/dist/web/assets/logos-8RY6YC28.js +1 -0
  41. package/dist/web/assets/parts-BHdGx04A.js +1 -0
  42. package/dist/web/assets/productParts-Dc6xUW1K.js +1 -0
  43. package/dist/web/assets/{qualityParts-Df8rJX4J.js → qualityParts-Bc827HSc.js} +1 -1
  44. package/dist/web/assets/segmented-TQMcwxQv.js +1 -0
  45. package/dist/web/assets/{thread-CE28Yblm.js → thread-CIPUw18f.js} +1 -1
  46. package/dist/web/assets/{usePageChat-3HvaQpPP.js → usePageChat-DSApZPFS.js} +1 -1
  47. package/dist/web/index.html +3 -3
  48. package/docs/ARCHITECTURE.md +1 -1
  49. package/docs/CONTAINERS.md +1 -1
  50. package/docs/EVIDENCE.md +9 -4
  51. package/docs/GRAPHIFY.md +178 -0
  52. package/docs/PRODUCT_KNOWLEDGE.md +25 -4
  53. package/docs/PRODUCT_VIEWS.md +5 -2
  54. package/docs/WEB_APP.md +23 -7
  55. package/docs/prompts/graphify-evidence.md +14 -11
  56. package/docs/user-guide.html +2 -1
  57. package/evals/evidence/domain/base/orders-api/src/report.ts +4 -0
  58. package/evals/evidence/domain/base/orders-api/src/routes/admin.ts +2 -1
  59. package/evals/evidence/domain/cases/bad-function-removed/after/src/workflow.ts +6 -0
  60. package/evals/evidence/domain/cases/bad-function-removed/case.json +14 -0
  61. package/evals/evidence/domain/cases/bad-signature-changed/after/src/workflow.ts +6 -0
  62. package/evals/evidence/domain/cases/bad-signature-changed/case.json +14 -0
  63. package/evals/evidence/domain/cases/bad-state-set-directly/after/src/routes/admin.ts +2 -1
  64. package/evals/evidence/domain/cases/bad-untested-change/after/src/routes/admin.ts +2 -1
  65. package/evals/evidence/domain/cases/bad-untested-helper/after/src/report.ts +4 -0
  66. package/evals/evidence/domain/cases/bad-untested-helper/case.json +14 -0
  67. package/evals/evidence/domain/cases/good-optional-parameter/after/src/workflow.ts +6 -0
  68. package/evals/evidence/domain/cases/good-optional-parameter/case.json +12 -0
  69. package/evals/evidence/domain/cases/good-tested-helper/after/src/clients/payments.ts +8 -0
  70. package/evals/evidence/domain/cases/good-tested-helper/case.json +12 -0
  71. package/forgeqe.example.yaml +13 -3
  72. package/package.json +15 -14
  73. package/prompts/product-investigate.md +1 -1
  74. package/py/forgeqe_desktop/models.py +14 -5
  75. package/py/forgeqe_engine/__init__.py +1 -1
  76. package/py/forgeqe_knowledge/graphify_bridge.py +156 -0
  77. package/dist/web/assets/Agent-CxCmYQU5.js +0 -4
  78. package/dist/web/assets/ApiTests-BYx-CDHt.js +0 -10
  79. package/dist/web/assets/Evidence-B9rcXYHM.js +0 -1
  80. package/dist/web/assets/Features-EGps6J7t.js +0 -1
  81. package/dist/web/assets/Jobs-DutW6w6P.js +0 -5
  82. package/dist/web/assets/KindPage-DOYNwJDp.js +0 -6
  83. package/dist/web/assets/Migration-5kPbd43c.js +0 -2
  84. package/dist/web/assets/Product-DSxgpqDA.js +0 -1
  85. package/dist/web/assets/Quality-Bo0GxWoZ.js +0 -1
  86. package/dist/web/assets/Record-gGESInMV.js +0 -2
  87. package/dist/web/assets/Regression-b5ykN8hf.js +0 -5
  88. package/dist/web/assets/Reports-BcIDq-yP.js +0 -2
  89. package/dist/web/assets/Response-DLbH7Zyc.js +0 -4
  90. package/dist/web/assets/Runs-C9YExlBk.js +0 -2
  91. package/dist/web/assets/Shell-DGv_Zqjs.js +0 -3
  92. package/dist/web/assets/TestCases-CynVHtUB.js +0 -1
  93. package/dist/web/assets/TestData-5ynuvxFS.js +0 -2
  94. package/dist/web/assets/Tosca-BMePLsZA.js +0 -2
  95. package/dist/web/assets/WhatsNew-gMY090GS.js +0 -1
  96. package/dist/web/assets/dataParts-PzO8u_dt.js +0 -3
  97. package/dist/web/assets/index-CrZYPHPP.css +0 -2
  98. package/dist/web/assets/index-DI1ST-gI.js +0 -43
  99. package/dist/web/assets/parts-BD8kP4IN.js +0 -1
  100. package/dist/web/assets/productParts-Q9GA6BML.js +0 -1
  101. package/dist/web/assets/segmented-1nc3D7ML.js +0 -1
@@ -98,8 +98,12 @@ Copilot costs no tokens, so the cost prompt then shows only the number of files
98
98
  1. **Scan** (no model). Each repository's files, languages, and frameworks (`package.json`, `pom.xml`, `*.csproj`,
99
99
  `requirements.txt`, `pyproject.toml`). `.gitignore` and `.forgeqeignore` apply. Hidden files and files named like
100
100
  credentials are never read.
101
- 2. **Structure** (no model). tree-sitter facts become `file`, `class`, `function` nodes and `contains`, `imports`,
102
- `calls` edges. Pattern rules add:
101
+ 2. **Structure** (no model). Graphify (`src/product/graphify.ts`, docs/GRAPHIFY.md) reads the code in about 40
102
+ languages: `class` and `function` nodes (a method as `Class.name`) and `calls`, `imports`, `inherits`, `implements`
103
+ and `contains` edges between them. A call from a test becomes `tested_by` on what it calls. Its `EXTRACTED` links are
104
+ observed and its `INFERRED` ones inferred, each with its file, line and quote. ForgeQE installs Graphify, pinned, into
105
+ `~/.forgeqe/knowledge/.venv` the first time; a rebuild reads only the changed files again. ForgeQE's own tree-sitter
106
+ facts add to the same nodes. Pattern rules add:
103
107
  - `endpoint` nodes from route definitions (Express, ASP.NET `[Http*]`, Spring `@*Mapping`, FastAPI and Flask);
104
108
  - `table` nodes from migrations and SQL;
105
109
  - `config` nodes, with `tested_by` edges from tests to the code they import;
@@ -152,9 +156,15 @@ Rules for links (as built):
152
156
  3. returns a compact block within a character budget, each line with `repo:file:line`.
153
157
  - **The `product_knowledge` tool** for ForgeQE's agent (`src/mcp/producttools.ts`), one tool with an `op`, as
154
158
  `data_flows` is: `search`, `node` (one node and its neighbours), `impact` (what depends on a file, class, endpoint,
155
- or table, across repositories, and the tests that cover it), `status`, `gaps`, and `build`. Phase 2 adds `flow` (a
159
+ or table, across repositories, and the tests that cover it: a function or class with known callers is followed
160
+ through them, the routes those calls are made under, and the services that call those routes, with each link only
161
+ inferred marked; anything else through its file's importers), `status`, `gaps`, and `build`. Phase 2 adds `flow` (a
156
162
  business flow, step by step). The same questions from a terminal:
157
- `forgeqe knowledge build|status|search|node|impact|flow|gaps|check|ask|findings`. `ask` (op `ask`) runs the
163
+ `forgeqe knowledge build|status|search|node|impact|path|flow|gaps|check|ask|findings`. `path <from> <to>` (op `path`,
164
+ `ref` and `to`) is the cheapest chain of links by which one reaches the other: calls, an endpoint's handler, calls
165
+ between services, table reads and writes, inheritance, and imports, which cost the most, so a chain of calls wins.
166
+ Both ways are tried, and an answer the other way round says so. Each step names the line it rests on, and a step only
167
+ inferred is marked. `ask` (op `ask`) runs the
158
168
  investigator (PRODUCT_VIEWS.md, Investigation).
159
169
  - **Prompts**: the planners, the explorer, the API planner, and the browser agent get the matching block next to
160
170
  today's knowledge sections.
@@ -189,6 +199,17 @@ is never changed).
189
199
  submodules and LFS are off and symbolic links are checked out as plain files. The token comes from `token_env` and is
190
200
  sent as an `http.<host>.extraHeader` through git's environment, so it is in no argument, link or file, and is cut out of
191
201
  any error shown.
202
+ - A repository's database (`product.repos.<name>.database`, a `databases:` entry) is read through ForgeQE's data engine
203
+ (`src/product/dbschema.ts`): that entry's own sign-in and an environment of only its variables, and only an entry that
204
+ is not writable. Its tables, columns, keys and foreign keys join the graph as `schema` evidence; a table the code
205
+ defines too gets both readings, and the build says which tables and columns differ between the code and the database.
206
+ Names from the database are plain text, capped.
207
+ - PDF, Word and Excel files of a docs folder are read as text by Graphify's converters (their size caps), only files the
208
+ folder's scan lists (no hidden, credential-named or linked-out file), each path checked inside the folder again.
209
+ - Graphify runs with an argument array and no shell, models off (`GRAPHIFY_BACKEND=none`), an environment of system
210
+ settings only, git's fsmonitor off, a time limit, and its output in ForgeQE's cache, never in the repository. It gets
211
+ ForgeQE's own file list, and its result is untrusted (`parseGraphify`): a known format and version only, a node only in
212
+ a listed file, a function's name only plain (no spaces, no shell characters), an edge only between nodes it kept.
192
213
  - Tests feed hostile input: a repository path of `../../.ssh`, a summary holding `<script>` and `; rm -rf ~`, and a
193
214
  document link of `javascript:`.
194
215
 
@@ -273,8 +273,11 @@ Rust and hand-written routing. Helm templates are not read yet.
273
273
  5. **Engineering view** (done) in the web app, page Product (`web/src/pages/Product.tsx`, data from
274
274
  `src/web/engineering.ts`): the services map drawn like ForgeQE's architecture map (bands for front ends,
275
275
  gateways, services, and data and messages; outside systems in a side column; wires at right angles laid out by
276
- `web/src/pages/archLayout.ts`, never through a card), with every link in words on its own tab; one service from the inside (endpoints with their authentication,
277
- callers and what a change reaches; calls out, data, messages, outside services, cloud resources); runs against the
276
+ `web/src/pages/archLayout.ts`, never through a card), with every link in words on its own tab, above them "How one part reaches another" (two parts picked from the graph's
277
+ search, and the chain of links between them with the line each rests on: `pathBetween`, `/api/knowledge/engineering/path`); one service from the inside (endpoints with their authentication,
278
+ callers and what a change reaches; calls out, data, messages, outside services, cloud resources; its modules, Graphify's
279
+ communities of the code, with their most called members; and what is most depended on, the hotspots, each with its
280
+ callers, the endpoints it serves and the tests that reach it, least tested first); runs against the
278
281
  code; open questions. Every part and link says how it is known, opens its evidence in a side panel, and an open
279
282
  question is investigated in a chat. Built on the sample product in `evals/knowledge/shop`. Findings are not yet
280
283
  shown on the page.
package/docs/WEB_APP.md CHANGED
@@ -53,6 +53,13 @@ in the credential store; no response shows it back, and a classic `ghp_` token i
53
53
  lists your seat's models, you pick one, and the Copilot profile in `llms.json` becomes the default. The card says who
54
54
  is signed in and how, with **Sign out**.
55
55
 
56
+ Once the folder is set up, Home (and an agent's page) says above the message box what would still stop a chat on this
57
+ computer, each with the button that fixes it: the browser engine or the agent runtime not installed (**Install what's
58
+ missing**), or the model the chat would use without its key or sign-in (**Add its key**, or pick a model that is ready).
59
+
60
+ Under the message box, Home also links to what needs a look today, only when there is something: runs that failed
61
+ today, requests from your agents waiting for your approval, jobs whose last run failed, and runs going now.
62
+
56
63
  Next time, `forgeqe web` opens the folder it is started in when ForgeQE is set up there, else the last project opened
57
64
  (it keeps the last ten).
58
65
 
@@ -63,12 +70,18 @@ files: each person's are in their own credential store.
63
70
 
64
71
  ## The layout
65
72
 
73
+ - **Search, at the top of the sidebar** (or **Ctrl+K**, **⌘K** on a Mac, on any page): type to go to any page, agent,
74
+ Settings section or setting (by its name or its forgeqe.yaml key, such as `browser.headless`); the arrow keys move,
75
+ Enter opens, Esc closes.
66
76
  - **The sidebar, on the left.** New chat (opens Home, where a chat starts; earlier chats are in Runs); **Agents**: a
67
77
  page for each of ForgeQE's agents (Orchestrator, Browser, Exploration, Planning, Coding, Search, Healing, API, API
68
78
  planning, Review, PR review, Root-cause, Refine, Evaluation, Model-rating, and the Research and Helper agents the
69
79
  others call), in categories that fold on their own: Lead, Browser, Test code, API, Review and diagnosis, Support;
70
- **Context** (what the agents know and follow): Knowledge, Memory, Guardrails, Skills, Prompts; **Test**: Record,
71
- Regression, API tests, Quality, Data; **Results**: Runs, Reports, Jobs. Each group folds from its title (Agents
80
+ **Context** (what the agents know and follow): Knowledge, Product, Memory, Guardrails, Skills, Prompts; **Test**:
81
+ Record, Regression, API tests, Test cases, Data (with Test data), Migrate (other tools, and Tosca); **Results**: Runs
82
+ (with the execution reports and the project report), Quality (with Accessibility, Performance and Visual), Jobs;
83
+ **Evidence**: Overview, Agent runs, Review queue, Governance (Contracts, Releases, Learn, Monitor). Pages that share
84
+ an entry link to each other beside their titles. Each group folds from its title (Agents
72
85
  starts folded), and the group of the page you are on stays open; and at the bottom What's ready, Help (the docs, the
73
86
  same pages as forgeqe.github.io/docs/ with the architecture map, served by ForgeQE itself, so they work
74
87
  offline) and Settings. It closes to a narrow rail of its icons (each named when you point at it), with the small logo
@@ -85,13 +98,14 @@ files: each person's are in their own credential store.
85
98
  Home is one box: say what to test, in your words. Under it, suggestions (Run test cases, Explore a journey, Write a
86
99
  test, Review requirements) fill the box with an example; they do not send.
87
100
 
88
- **The Agents page** is one directory of every agent in four columns side by side, one per category (AI assisted, AI
89
- native, Agentic, Custom agents), each with its count, a few words of what it holds and a bar of how much its agents act
101
+ **The Agents page** is one directory of every agent in four columns side by side, one per category (Advisers, which
102
+ help you decide; Builders, which do the work for you; Operators, which work on their own; and Custom agents; once
103
+ called AI assisted, AI native and agentic), each with its count, a few words of what it holds and a bar of how much its agents act
90
104
  on their own; the favourites come first in each. A column shows its first six agents and **More agents** the rest (a
91
105
  search or a filter shows every match). Each agent is a row of the same size: its icon, its name with a dot of its
92
106
  status, what it does in a few words, and its star; hovering it says more (what it does, why its status is what it is,
93
107
  and what it reaches and may do: Browser, Repository, Databases, the systems it signs in to; Read-only, Writes files,
94
- Runs commands or Acts on pages). The statuses are Ready; Partly set up (parts it can use are off); Needs attention (it
108
+ Runs commands or Acts on pages). When no agent of ForgeQE's own can run, the page says why once above the columns, with the button that fixes it. The statuses are Ready; Partly set up (parts it can use are off); Needs attention (it
95
109
  cannot work without something missing, such as the test repository); Unavailable (no model is ready, or the engine or
96
110
  agent runtime is not installed), and the chips above filter by them or by Favourites.
97
111
 
@@ -196,8 +210,10 @@ See [Reports from the agent](../HOW_TO_USE.md#reports-from-the-agent).
196
210
  ## Settings
197
211
 
198
212
  Settings takes over the window: one menu on the left, with **Back** and **Search settings** (by name or
199
- `forgeqe.yaml` key), and the sections under General, AI, Testing, Activity and Advanced. Each setting shows its
200
- `forgeqe.yaml` key under its help.
213
+ `forgeqe.yaml` key), and the sections under General, AI, Testing, Activity and Advanced. The ones most projects change
214
+ (Set up, Environments, Sign-ins, Integrations, Notifications, Appearance, Models, Databases, About) are always listed;
215
+ the others fold under **More settings**, which opens by itself while one of them is open and stays as you leave it. On a
216
+ phone the menu lists every section. Each setting shows its `forgeqe.yaml` key under its help.
201
217
 
202
218
  **Appearance** gives the web app the project's look, for everyone who opens it: a logo (PNG, JPEG, WebP or SVG) and
203
219
  a name for the sidebar, the sidebar's colour (primary, with an optional second colour it fades into), the colour of
@@ -20,7 +20,8 @@ languages, locally and without a model. It writes `graphify-out/graph.json` with
20
20
  edges, each tagged `EXTRACTED` or `INFERRED`. It also builds communities (Leiden), "god nodes", and nodes for `# NOTE:` /
21
21
  `# WHY:` comments and ADR/RFC citations. It can introspect a Postgres schema and read PDF and Office files.
22
22
 
23
- **Use Graphify as an optional source for ForgeQE's graph. Do not replace anything.** These stay ForgeQE's own:
23
+ **Graphify is part of every build: it reads the code structure (functions, classes, calls, imports, inheritance, "why"
24
+ comments).** The measured comparison is in `ForgeQE/docs/GRAPHIFY.md`. These stay ForgeQE's own:
24
25
  - cross-repository linking (`resolveCalls`, `resolveTables`, `src/product/wiring*.ts`);
25
26
  - the infrastructure resolver;
26
27
  - the Evidence model (`Evidence` in `src/product/types.ts`: source, state observed/inferred/unknown, confidence, quote);
@@ -62,20 +63,22 @@ edges, each tagged `EXTRACTED` or `INFERRED`. It also builds communities (Leiden
62
63
  - where it writes files.
63
64
  Stop and report if any of these does not hold.
64
65
 
65
- Put the findings in `ForgeQE/docs/GRAPHIFY.md` and show me the comparison before Step 1.
66
+ Put the findings in `ForgeQE/docs/GRAPHIFY.md` and show me the comparison before Step 1. (Done: `GRAPHIFY.md`.)
66
67
 
67
- ## Step 1: Graphify as an optional reader
68
+ ## Step 1: Graphify as the code reader
68
69
 
69
- - **Setting:** `product.readers: [graphify]` (default: none), with a Settings › Evidence field ("Building the graph"), an example in
70
- `forgeqe.example.yaml`, a `HOW_TO_USE.md` line, and the coverage test.
70
+ - **Install:** ForgeQE installs it like the browser engine (`src/engine/setup.ts`): its own virtualenv
71
+ `~/.forgeqe/knowledge/.venv` made with `uv`, `graphifyy[sql,terraform]==<pinned>`, checked by `forgeqe doctor`. No setting
72
+ turns it off.
71
73
  - **Running it:** Graphify runs once per repository after the repository is fetched, into a folder under ForgeQE's cache (never inside
72
- the repository):
74
+ the repository), through a bridge script of ForgeQE's that calls its library with the file list `scanRepo` made:
73
75
  - started with an argument array and no shell;
74
76
  - `GRAPHIFY_BACKEND=none` and `GRAPHIFY_QUERY_LOG_DISABLE=1`;
75
77
  - the environment built with `allowListEnv`, never one of `privateEnvNames`;
76
78
  - a time limit and an output size limit;
77
79
  - the program found on PATH or through a setting holding a path; never a command string.
78
- - When Graphify is not installed, the build says so once and carries on without it.
80
+ - When it cannot be installed (no Python 3.10+, no network to PyPI), the build stops and says how to fix it.
81
+ - Only the changed files are read again, with the rest passed as resolution context (`GRAPHIFY.md`, Gotchas).
79
82
  - **Reading its output:** a new `src/product/graphify.ts` reads `graph.json` as **untrusted**:
80
83
  - its `schema_version` is checked against the versions you saw in Step 0;
81
84
  - known fields only, of their types, with sizes capped;
@@ -98,7 +101,7 @@ Put the findings in `ForgeQE/docs/GRAPHIFY.md` and show me the comparison before
98
101
  - a 50 MB file;
99
102
  - a name holding `; rm -rf ~` or an instruction;
100
103
  - an edge to a node that does not exist.
101
- - A missing `graphify` program is reported, not thrown.
104
+ - A missing or failing Graphify stops the build with its reason.
102
105
 
103
106
  ## Step 2: function-level calls for impact and the domain check
104
107
 
@@ -108,7 +111,7 @@ Put the findings in `ForgeQE/docs/GRAPHIFY.md` and show me the comparison before
108
111
  Its **dependencies** check names the callers of a changed function.
109
112
  - Each finding says which link is Graphify's (`how`), and a finding resting only on inferred links says so.
110
113
  - Tests: a change to a helper two calls below an endpoint is reported against that endpoint. A test reaching it through calls
111
- counts. Without Graphify the results are what they are today.
114
+ counts. Where nothing calls a function (a module's top-level code), imports still carry the impact.
112
115
 
113
116
  ## Step 3: paths for the Investigator
114
117
 
@@ -155,8 +158,8 @@ Put the findings in `ForgeQE/docs/GRAPHIFY.md` and show me the comparison before
155
158
  - untrusted input checked by an allowlist;
156
159
  - TLS verification never off;
157
160
  - a hostile-input test for every boundary.
158
- - **Packaging:** Graphify stays optional. ForgeQE's npm package does not depend on it; `ForgeQE/scripts/runtime.ts` and
159
- `THIRD_PARTY_NOTICES.md` change only if something is bundled.
161
+ - **Packaging:** Graphify is installed at run time into ForgeQE's own virtualenv, pinned, not bundled into the npm package.
162
+ Credit it in `THIRD_PARTY_NOTICES.md` all the same (Apache-2.0).
160
163
  - **Checks:** before each push, in `ForgeQE/`, `bun run typecheck` and the product and Evidence tests (`bun test` for the files you touched,
161
164
  then the full suite once), and in `ForgeQE/web`, `npm run typecheck`. Report failures that also fail on `main` as such.
162
165
  - **Commits:** one commit per step. No model names in commits, code or the PR.
@@ -2108,6 +2108,7 @@ forgeqe knowledge landscape # the product's systems and how they talk (
2108
2108
  forgeqe knowledge history # each build: the commits it read, and the endpoints, screens, tables, rules that came and went
2109
2109
  forgeqe knowledge search &quot;cancel an order&quot;
2110
2110
  forgeqe knowledge impact Services/OrderService.cs # what a change reaches: code across repositories, business flows, tests
2111
+ forgeqe knowledge path web/src/pages/Checkout.tsx api:table:orders # how one part reaches another, each step with its line
2111
2112
  forgeqe knowledge flow &quot;cancel an order&quot; # a business flow, step by step, with the code of each step
2112
2113
  forgeqe knowledge gaps # what the build could not settle: calls no route or several fit, other hosts, unknown tables
2113
2114
  forgeqe knowledge check # find each quoted line again in its file: what moved, what is gone
@@ -3648,7 +3649,7 @@ workspace's image.</li>
3648
3649
  provider: docker # or per run: --browser-provider docker
3649
3650
  containers:
3650
3651
  browser: # optional
3651
- image: mcr.microsoft.com/playwright:v1.63.0-noble # default; needs Node.js and /ms-playwright
3652
+ image: mcr.microsoft.com/playwright:v1.65.0-noble # default; needs Node.js and /ms-playwright
3652
3653
  headless: false # default: browser.headless; a visible browser runs on a virtual display (Xvfb)
3653
3654
  </code></pre>
3654
3655
  <ul>
@@ -0,0 +1,4 @@
1
+ /** The admin list of orders: each order's id and total, newest first as the query gives them. */
2
+ export function summarize(orders: { id: number; total: number }[]) {
3
+ return orders.map((o) => ({ id: o.id, total: o.total }))
4
+ }
@@ -1,10 +1,11 @@
1
1
  import express from "express"
2
2
  import { requireAuth } from "../auth"
3
3
  import { db } from "../db"
4
+ import { summarize } from "../report"
4
5
 
5
6
  export const router = express.Router()
6
7
 
7
8
  router.get("/api/admin/orders", requireAuth, async (req, res) => {
8
9
  const orders = await db.any("SELECT * FROM orders ORDER BY created_at DESC LIMIT 50")
9
- res.json(orders)
10
+ res.json(summarize(orders))
10
11
  })
@@ -0,0 +1,6 @@
1
+ import { db } from "./db"
2
+
3
+ /** Every change of an order's status goes through here, so it is recorded once and in order. */
4
+ export async function cancelOrder(orderId: number) {
5
+ await db.none("UPDATE orders SET status = 'cancelled', cancelled_at = now() WHERE id = $1", [orderId])
6
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "why": "Planted: cancel() is renamed cancelOrder(), and the cancel route still calls cancel().",
3
+ "repo": "orders-api",
4
+ "changes": [
5
+ {
6
+ "path": "src/workflow.ts"
7
+ }
8
+ ],
9
+ "expect": {
10
+ "findings": [
11
+ "dependencies:function-removed"
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1,6 @@
1
+ import { db } from "./db"
2
+
3
+ /** Every change of an order's status goes through here, so it is recorded once and in order. */
4
+ export async function cancel(orderId: number, reason: string) {
5
+ await db.none("UPDATE orders SET status = 'cancelled', cancelled_at = now(), cancel_reason = $2 WHERE id = $1", [orderId, reason])
6
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "why": "Planted: cancel() now needs a reason, and the cancel route, which calls it, is not changed.",
3
+ "repo": "orders-api",
4
+ "changes": [
5
+ {
6
+ "path": "src/workflow.ts"
7
+ }
8
+ ],
9
+ "expect": {
10
+ "findings": [
11
+ "dependencies:signature-changed"
12
+ ]
13
+ }
14
+ }
@@ -1,12 +1,13 @@
1
1
  import express from "express"
2
2
  import { requireAuth } from "../auth"
3
3
  import { db } from "../db"
4
+ import { summarize } from "../report"
4
5
 
5
6
  export const router = express.Router()
6
7
 
7
8
  router.get("/api/admin/orders", requireAuth, async (req, res) => {
8
9
  const orders = await db.any("SELECT * FROM orders ORDER BY created_at DESC LIMIT 50")
9
- res.json(orders)
10
+ res.json(summarize(orders))
10
11
  })
11
12
 
12
13
  router.post("/api/admin/orders/:id/cancel", requireAuth, async (req, res) => {
@@ -1,10 +1,11 @@
1
1
  import express from "express"
2
2
  import { requireAuth } from "../auth"
3
3
  import { db } from "../db"
4
+ import { summarize } from "../report"
4
5
 
5
6
  export const router = express.Router()
6
7
 
7
8
  router.get("/api/admin/orders", requireAuth, async (req, res) => {
8
9
  const orders = await db.any("SELECT * FROM orders ORDER BY created_at DESC LIMIT 500")
9
- res.json(orders)
10
+ res.json(summarize(orders))
10
11
  })
@@ -0,0 +1,4 @@
1
+ /** The admin list of orders: each order's id and total, newest first as the query gives them. */
2
+ export function summarize(orders: { id: number; total: number }[]) {
3
+ return orders.map((o) => ({ id: o.id, total: Math.round(o.total * 100) / 100 }))
4
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "why": "Planted: changes summarize(), which only the admin route calls, and no test reaches that route.",
3
+ "repo": "orders-api",
4
+ "changes": [
5
+ {
6
+ "path": "src/report.ts"
7
+ }
8
+ ],
9
+ "expect": {
10
+ "findings": [
11
+ "regression:untested-code"
12
+ ]
13
+ }
14
+ }
@@ -0,0 +1,6 @@
1
+ import { db } from "./db"
2
+
3
+ /** Every change of an order's status goes through here, so it is recorded once and in order. */
4
+ export async function cancel(orderId: number, reason = "customer") {
5
+ await db.none("UPDATE orders SET status = 'cancelled', cancelled_at = now(), cancel_reason = $2 WHERE id = $1", [orderId, reason])
6
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "why": "cancel() takes a reason with a default: the cancel route still calls it as it did.",
3
+ "repo": "orders-api",
4
+ "changes": [
5
+ {
6
+ "path": "src/workflow.ts"
7
+ }
8
+ ],
9
+ "expect": {
10
+ "findings": []
11
+ }
12
+ }
@@ -0,0 +1,8 @@
1
+ const PAYMENTS_URL = process.env.PAYMENTS_URL || "http://payments.internal"
2
+
3
+ /** Asks the payments service to refund a payment. */
4
+ export async function refundPayment(paymentId: string) {
5
+ const res = await fetch(`${PAYMENTS_URL}/payments/${paymentId}/refunds`, { method: "POST" })
6
+ if (!res.ok) throw new Error(`Refund of ${paymentId} failed: ${res.status}`)
7
+ return res.json()
8
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "why": "Changes refundPayment(), which the cancel route calls; a test reaches that route.",
3
+ "repo": "orders-api",
4
+ "changes": [
5
+ {
6
+ "path": "src/clients/payments.ts"
7
+ }
8
+ ],
9
+ "expect": {
10
+ "findings": []
11
+ }
12
+ }
@@ -33,6 +33,8 @@ environments:
33
33
  # off: [desktop-apps] # never given
34
34
  # names: # what you call each agent, in the web app and the terminal (at most 40 characters)
35
35
  # forgeqe: Atlas # the Orchestrator; also engine, forgeqe-test, forgeqe-heal, ... (Settings › Agents lists them)
36
+ # app_name: Assure # what ForgeQE itself is called in the web app and the documents it writes (at most
37
+ # # 40 characters; commands and files keep forgeqe)
36
38
 
37
39
  # Mobile apps (Android, iOS): the apps themselves are in env.yaml (kind: mobile). Appium runs workflows step by step
38
40
  # and explores goals; Maestro replays them and runs your team's own flows. See docs/MOBILE.md.
@@ -183,6 +185,8 @@ prompts:
183
185
  # # partners: { git: https://github.com/acme/partners, user: jo, token_env: GITHUB_TOKEN }
184
186
  # # system: the system it is part of (CRM, Digital, Mobile, Payments), for the Landscape on the Product page, e.g.
185
187
  # # crm-core: { git: https://bitbucket.acme.local/scm/crm/crm-core.git, system: CRM }; empty: grouped by its name
188
+ # # database: a databases: entry whose tables, keys and foreign keys are read into the graph (read-only entries only),
189
+ # # e.g. orders: { git: https://dev.azure.com/acme/Shop/_git/orders, database: orders }
186
190
  # exclude: ["**/generated/**"] # glob patterns, beside each repository's .gitignore and .forgeqeignore
187
191
  # model: true # the model of llms.json (llm.routing: analysis) reads them: what each part does, the
188
192
  # # business domains and flows; false: structure only, nothing is sent to a model
@@ -222,9 +226,15 @@ prompts:
222
226
  # logo_frame: plain # plain (as it is) | rounded | circle | tile (on a white tile, for a dark logo)
223
227
  # icon_style: auto # auto | plain | tiles | outline | mono: the sidebar's icons on its colour; auto
224
228
  # # measures them and puts them on tiles when the colour hides one (3D icons only)
225
- # icon_set: phosphor # phosphor | solar | 3d: the pages' and agents' icons everywhere; phosphor (Phosphor
226
- # # Duotone, the default) and solar (Solar Bold Duotone) are flat, in the text's
227
- # # colour, so they show on any sidebar colour; 3d is ForgeQE's pixel icons
229
+ # icon_set: phosphor # phosphor | solar | lucide | 3d: the pages' and agents' icons everywhere; phosphor
230
+ # # (Phosphor Duotone, the default), solar (Solar Bold Duotone) and lucide are flat,
231
+ # # black (white in dark mode) or icon_colour, so they show on any sidebar
232
+ # # colour; 3d is ForgeQE's pixel icons. lucide draws the buttons' and menus'
233
+ # # icons in Lucide too; the others keep Phosphor's
234
+ # icon_colour: accent # text (the default: black, white in dark mode) | accent (the buttons' colour) |
235
+ # # a colour such as "#7c3aed": the flat icons' lines, made darker or lighter
236
+ # # where they would not show; phosphor's and solar's second tone (grey in
237
+ # # black) takes the colour's palest shade
228
238
  # logo_size: standard # standard | large (a wide logo across the sidebar's top, for one with small words)
229
239
  # primary: "#0b1f3a" # the sidebar in light mode; dark mode uses the dark sidebar
230
240
  # gradient: "#1d4ed8" # a second sidebar colour it fades into, top to bottom
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capagents/forgeqe",
3
- "version": "2.7.2",
3
+ "version": "2.7.4",
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": {
@@ -19,6 +19,7 @@
19
19
  "py/forgeqe_engine/*.py",
20
20
  "py/forgeqe_desktop/*.py",
21
21
  "py/forgeqe_mobile/*.py",
22
+ "py/forgeqe_knowledge/*.py",
22
23
  "py/forgeqe_tosca/*.py",
23
24
  "py/forgeqe_tosca/vendor/toscatsu/",
24
25
  "guardrails/",
@@ -68,23 +69,23 @@
68
69
  "test-automation"
69
70
  ],
70
71
  "dependencies": {
71
- "@opentui/core": "^0.5.12",
72
- "jscpd": "5.4.1"
72
+ "@opentui/core": "^0.8.2",
73
+ "jscpd": "5.4.2"
73
74
  },
74
75
  "optionalDependencies": {
75
- "@oven/bun-darwin-aarch64": "1.4.2",
76
- "@oven/bun-darwin-x64-baseline": "1.4.2",
77
- "@oven/bun-linux-aarch64": "1.4.2",
78
- "@oven/bun-linux-aarch64-musl": "1.4.2",
79
- "@oven/bun-linux-x64-baseline": "1.4.2",
80
- "@oven/bun-linux-x64-musl-baseline": "1.4.2",
81
- "@oven/bun-windows-aarch64": "1.4.2",
82
- "@oven/bun-windows-x64-baseline": "1.4.2"
76
+ "@oven/bun-darwin-aarch64": "1.4.4",
77
+ "@oven/bun-darwin-x64-baseline": "1.4.4",
78
+ "@oven/bun-linux-aarch64": "1.4.4",
79
+ "@oven/bun-linux-aarch64-musl": "1.4.4",
80
+ "@oven/bun-linux-x64-baseline": "1.4.4",
81
+ "@oven/bun-linux-x64-musl-baseline": "1.4.4",
82
+ "@oven/bun-windows-aarch64": "1.4.4",
83
+ "@oven/bun-windows-x64-baseline": "1.4.4"
83
84
  },
84
85
  "devDependencies": {
85
- "@opencode-ai/sdk": "1.18.33",
86
- "@opentui/react": "^0.5.12",
87
- "@types/bun": "^1.4.2",
86
+ "@opencode-ai/sdk": "1.19.5",
87
+ "@opentui/react": "^0.8.2",
88
+ "@types/bun": "^1.4.4",
88
89
  "@types/nodemailer": "^8.0.2",
89
90
  "@types/pngjs": "^6.0.5",
90
91
  "@types/react": "^19.3.0",
@@ -16,7 +16,7 @@ Answer one question about the product. Each fact in your answer MUST rest on lin
16
16
  The request starts with "Question:". It can give earlier findings about the product, from earlier questions. An earlier finding is a place to start. It is not proof: read its lines again when your answer rests on it.
17
17
 
18
18
  You have five tools:
19
- - product_knowledge: the product graph. op search finds the parts that a question is about. op node gives one part and its links. op flow gives a business flow. op impact gives what a change reaches. op gaps gives what the graph could not settle. op status gives what the graph holds. Each part has an id and its repository, file, and line.
19
+ - product_knowledge: the product graph. op search finds the parts that a question is about. op node gives one part and its links. op flow gives a business flow. op impact gives what a change reaches. op path gives how one part reaches another (ref and to), step by step, each step with the line of code it rests on; use it for "how does A end up doing B". op gaps gives what the graph could not settle. op status gives what the graph holds. Each part has an id and its repository, file, and line.
20
20
  - product_code: op read gives lines of one file, each with its number. op find gives the lines that contain a word or phrase, in all files or in one repository. op read also reads a document page that product_docs names and a run that product_runs names.
21
21
  - product_docs: op search gives the passages of the documents from links and Confluence that match some words, each with its repo, file, and line.
22
22
  - product_runs: op list gives ForgeQE's runs that recorded API calls. op find gives the recorded calls that match a method, a host, or a path. A recorded call shows what the product really did when it ran.
@@ -92,6 +92,16 @@ def check_messages(messages: List[Mapping[str, Any]]) -> List[Dict[str, Any]]:
92
92
  return out
93
93
 
94
94
 
95
+
96
+ def _http_library(openai: Any) -> Any:
97
+ """The HTTP library this ``openai`` is built on: httpx up to 1.x (UFO pins 1.66), httpx2 from 3.x."""
98
+ import importlib
99
+
100
+ for cls in openai.DefaultHttpxClient.__mro__[1:]:
101
+ if cls.__name__ == "Client":
102
+ return importlib.import_module(cls.__module__.split(".")[0])
103
+ raise ProfileError("This openai package has no HTTP client ForgeQE knows.")
104
+
95
105
  def build_client(profile: Mapping[str, Any]) -> Tuple[Any, str]:
96
106
  """An ``openai`` client and the model (or Azure deployment) name for a profile."""
97
107
  import openai
@@ -134,16 +144,15 @@ def build_client(profile: Mapping[str, Any]) -> Tuple[Any, str]:
134
144
  if provider == "ollama" and not re.search(r"/v1/?$", base):
135
145
  base = base.rstrip("/") + "/v1"
136
146
  if entra:
137
- import httpx
138
-
139
147
  token = entra_token_provider(cfg)
148
+ http = _http_library(openai)
140
149
 
141
- class _Bearer(httpx.Auth):
142
- def auth_flow(self, request: httpx.Request):
150
+ class _Bearer(http.Auth):
151
+ def auth_flow(self, request):
143
152
  request.headers["Authorization"] = f"Bearer {token()}"
144
153
  yield request
145
154
 
146
- return openai.OpenAI(base_url=base, api_key="entra", http_client=httpx.Client(auth=_Bearer())), model
155
+ return openai.OpenAI(base_url=base, api_key="entra", http_client=openai.DefaultHttpxClient(auth=_Bearer())), model
147
156
  return openai.OpenAI(base_url=base, api_key=api_key or "local"), model
148
157
 
149
158
  raise ProfileError(f"Unsupported LLM provider for the desktop engine: {provider}")
@@ -1,3 +1,3 @@
1
1
  """ForgeQE browser engine: the library's Agent plus recovery prompts, loop breaker, and workflow export."""
2
2
 
3
- BROWSER_USE_VERSION = "0.13.10"
3
+ BROWSER_USE_VERSION = "0.13.14"