Repository navigation
chore: Merge main into feature/laileni-fixes - #3086
Open
laileni-aws wants to merge 3 commits into
Open
laileni-aws wants to merge 3 commits into
laileni-aws wants to merge 3 commits into
Conversation
…he whole file is on disk (#3077) * feat(amazonq): send generate_integration_tests and browser in ATX CreateJob objective (#2962) Forward the customer's "Generate and run integration tests on this machine" choice and the detected local browser from the StartTransformRequest to the ATX job objective. - StartTransformRequest: optional GenerateIntegrationTests and Browser {Type, Version} - createJob: writes generate_integration_tests only when it is a real boolean (an explicit false is a decline; absent keeps legacy behavior), and browser {type, version} only when well-formed - Objective key names live in ATX_OBJECTIVE_GENERATE_INTEGRATION_TESTS_KEY / ATX_OBJECTIVE_BROWSER_KEY; the integration-test key is pending the Transform agent's C1 confirmation - Unit tests for createJob objective and startTransform forwarding * feat(amazonq): add ITGen test-run and app-launch models (contract v0 draft) (#2967) * feat(amazonq): add ITGen test-run request and summary models (contract v0 draft) TypeScript mirror of the VS extension's AtxTestRunRequest / AtxTestRunSummary for the ITGen integration-test HITL payloads (ITGen–IDE contract v0, schema 1.0). Not wired into any handler yet. - AtxTestRunRequest: top-level artifactId (repo artifact holding the generated test projects, re-downloaded per request) and localFolder; side decides where the app starts (original: upload copy, transformed: solution), so no source code is downloaded. ATX_TEST_RUN_BASE_URL_ENV = AB_BASE_URL is set by the IDE on the port it picks. - AtxTestRunSummary: status, appUrl, startedAt/finishedAt, durationSeconds, counts, failingTests. - isSupportedAtxTestRunSchemaVersion: accepts the same major version as ATX_TEST_RUN_SCHEMA_VERSION (1.x); rejects other majors and malformed values. - Unit tests with a real Bob's Used Bookstore run reshaped to the contract. * feat(amazonq): add ITGen app-launch request and result models (contract v0 draft) TypeScript mirror of the VS extension's AtxAppLaunchRequest / AtxAppLaunchResult for the integ-app-launch HITL (transformed-code run contract, Taskei P541522260, merged into P541522201). - AtxTestRunApp extracted so the test-run and app-launch requests share it. - AtxAppLaunchRequest: side, project, attempt, app (proposal; contract v0 §6 defines only the result). Like LBV's rounds, the number of attempts is the agent's decision, so there's no limit field. - AtxAppLaunchResult: status STARTED | APP_NOT_STARTED, appUrl, healthCheck {path, httpStatus}, error, logFile, durationSeconds. - Unit tests with Bob's Used Bookstore's real first launch. * refactor(amazonq): trim ITGen test-run and app-launch requests to the fields the IDE needs Mirror of the VS extension change (contract v0 review, 10/23): - AtxTestRunRequest: schemaVersion, runId, side, project, artifactId, tests.projectPath, limits.projectTimeoutSeconds. Dropped round, localFolder, app, env and limits.maxResultZipMB. - AtxAppLaunchRequest: app is now AtxAppLaunchApp {webProject, healthCheckPaths?, startTimeoutSeconds?}; dropped host. * feat(amazonq): ITGen test HITL handlers, any-depth diff apply, completeHitlWithTestResults (behind ATX_ITGEN_ENABLED) (#2976) * feat(amazonq): apply ITGen step diffs at any plan depth behind ATX_ITGEN_ENABLED With integration tests on, the agent nests LBV under local-verification (CR-315347405), so LBV error-fix rounds move to depth 3 and are never applied, while the nested LBV step (depth 2, no diff) is reported as a failed apply on every poll. Behind the new ATX_ITGEN_ENABLED flag (stand-in for the row 18 feature flag), completed steps are selected by having a step-tagged CUSTOMER_OUTPUT artifact rather than by depth: one paginated job-wide ListArtifacts call, only when a SUCCEEDED step still needs a download. Steps without an artifact are skipped, not failed; steps apply in tree post-order. With the flag off, the depth-2 behavior is unchanged. * feat(amazonq): add ITGen test HITL handlers and completeHitlWithTestResults behind ATX_ITGEN_ENABLED Language-server side of the ITGen-IDE contract v0 (sections 3-6), all gated on ATX_ITGEN_ENABLED; with the flag off every path is unchanged. - HITL selection: integ-app-launch, then integ-test-run, after LBV and missing-packages and before *-checkpoint, at all three selection sites. integ-* HITLs are returned with their StepId on the EXECUTING, PLANNING and AWAITING_HUMAN_INPUT paths, never treated as a plan-review ZIP. - getTransformInfo returns OpenHitls[] (TaskId, Tag, StepId, expiry), built from the ListHitls the poll already made. For integ-* HITLs the agent's request is saved once per task to artifactWorkspace/<job>/hitl/<taskId>/request.json and rejected (RequestError) when the schemaVersion major isn't 1. For integ-test-run the repo artifact with the generated tests is downloaded again for every task into itgen/<runId>/tests (TestsPath), since the agent rewrites it under the same id. Agent-supplied ids used as folder names are checked. - New aws/atxTransform/completeHitlWithTestResults: checks the result ZIP holds summary.json (test run) or launch-result.json (app launch) with a supported schemaVersion, uploads it as HITL_FROM_USER, completes the upload and submits the task by id (SubmitCriticalHitlTask). * feat(amazonq): align ITGen test HITLs with contract v0 schema 1.1 Follows the 10/26 contract update (interactive app launch): - completeHitlWithTestResults adds the customer's changed files to every transformed-side result ZIP (launch and test run) as workspace/metadata.json + workspace/<relative path>, with the same scan and metadata as updateWorkspace (tracked files modified since job start). The IDE's ZIP is left as it is; a copy is uploaded. Original side results are uploaded unchanged. - AtxAppLaunchResult gains optional launchedBy ('ide' | 'customer'). - NOT_LOCALHOST is removed from AtxTestRunStatus (published URLs are allowed on the original side). - ATX_TEST_RUN_SCHEMA_VERSION is 1.1 (1.0 payloads are still accepted). - The side comment now says the original runs from artifactWorkspace/before/. * feat(amazonq): remove earlier ITGen runs' tests and validate tests.projectPath (#2988) * feat(amazonq): keep only the ITGen test project per run and drop earlier runs' tests The integ-test-run tests artifact is the repo artifact, which can hold the whole repo. Extract it to a staging folder and keep only the folder of tests.projectPath (falling back to the whole artifact, with a warning, when that folder isn't in it). Refuse a rooted or climbing tests.projectPath. Once a run's tests are in place, remove the tests of earlier runs of the same side and project; their run folders (with the result ZIPs) stay. * fix(amazonq): keep the whole ITGen tests artifact so project references resolve A generated test project can reference other projects in the artifact (for example a common library from the source repo) and rely on its root build files (Directory.Build.props, Directory.Packages.props, nuget.config), so filtering to the test project's folder could break its build. Extract the whole artifact in its own layout again; earlier runs' tests are still removed, so a job keeps one copy per project. Warn when tests.projectPath isn't in the artifact, and keep refusing a rooted or climbing tests.projectPath. * fix(amazonq): guard ITGen test cleanup against overlapping downloads Address review on #2988: - Overlapping polls for the same task now share one download, and only the newest run started for a side and project collects earlier runs, so a late duplicate or stale download can't delete the current run's tests. - No marker and no cleanup when the request has no side or project. - Reusing tests downloaded before tests.project existed backfills the marker. - The comment and test fixture describe independent test projects (contract decision 16), not tests that reference application source. * feat(amazonq): download a beamed repo's original code to artifactWork… (#2987) * feat(amazonq): download a beamed repo's original code to artifactWorkspace/before (ITGen) Adds aws/atxTransform/downloadOriginalCode and OriginalArtifactId on the beamed-repo record, so the IDE can fetch a beamed repo's pre-transformation source by its codeArtifactId. It extracts into artifactWorkspace/before, the folder the IDE copies a local job's original to and the ITGen coordinator reads from. One copy per solution, tagged with a job marker; stub Directory.Build.*/Directory.Packages.props stop MSBuild importing the transformed solution's files. Staged extract + rename, so a failed download never looks complete. * fix(amazonq): downloadOriginalCode rejects only real '..' segments (ITGen) A folder name like 'Foo..Bar' in the solution path was rejected as traversal. * fix(amazonq): make the beamed original download safe to reuse, replace and repeat (ITGen) From the Code Review Sage review of #2987: - The marker records the job AND the original-code artifact; a copy is reused only when both match (a web job has one original per repo, and an original can be re-saved). An older plain-text marker is treated as no match. - Replacing a copy no longer deletes it in place: the old marker goes first, the old copy is moved aside, the new one is renamed in, and the old one is deleted best-effort. A copy that is only partly replaced is never reused; if the new copy can't be moved in, the old one is put back without its marker. - Calls for the same solution are queued and each extracts into its own staging folder, so two Loads can't corrupt each other; a queued duplicate reuses the finished copy. Leftover staging/aside folders are cleaned up on the next call. - The job id is checked with the shared isSafePathSegment; the comment no longer claims it reaches a path. * fix(amazonq): gate the original-code download on ATX_ITGEN_ENABLED, tidy its file handling - downloadOriginalCode refuses unless ATX_ITGEN_ENABLED is on, like completeHitlWithTestResults - one isSafeAbsolutePath check ('..' segments only) for beam and original-code folders - clear leftovers before the reuse check; match only before.partial-* / before.old-* - async rename/rm in the swap and cleanup * feat(amazonq): send ITGen generate_ui_tests and generate_api_tests in ATX CreateJob objective (#3020) * feat(amazonq): send ITGen generate_ui_tests and generate_api_tests in ATX CreateJob objective The IDE start dialog now has a Verification checkbox with three sub-options: Generate unit tests, Generate UI tests and Generate API tests (ITGen-IDE contract v0, section 1). Forward the two new choices from the StartTransformRequest to the ATX job objective. - StartTransformRequest: optional GenerateUITests and GenerateApiTests - startTransform forwards them to createJob - createJob writes generate_ui_tests / generate_api_tests only when they are real booleans (an explicit false is a decline; absent, as from older IDEs, keeps today's objective) - generate_integration_tests and browser are unchanged: the IDE sends integration = UI || API and only sends the browser for UI tests - Unit tests for the objective keys and startTransform forwarding * fix(amazonq): name the ITGen start-dialog group Validation in comments Review follow-up (#3020.1): two new comments called the group "Verification". The IDE (toolkit #2998) and the contract call it "Validation". * fix(amazonq): only send ITGen keys in the CreateJob objective when ITGen is on createJob wrote generate_integration_tests, generate_ui_tests, generate_api_tests and browser into the ATX job objective whether or not ATX_ITGEN_ENABLED was on, while the other ITGen paths in the handler check isItGenEnabled(). Gate all four behind isItGenEnabled() so a client that sends them can't change job objectives where ITGen is off. generate_unit_tests stays ungated. It is the separate unit-test generation choice, shipped on main before ITGen, and is not part of ITGen. With ITGen on, the keys are forwarded as before, with the same boolean-only rule. Tests cover both states, including explicit false choices and a flag value other than exactly "true". Refs: #2857 --------- Co-authored-by: David Topchyan <davetop@amazon.com> * feat(amazonq): generate_integration_tests is the only ITGen key and gate (remove UI/API keys and ATX_ITGEN_ENABLED) (#3024) * feat(amazonq): make generate_integration_tests the only ITGen objective key The team agreed (11/02) that generate_integration_tests is the only ITGen switch in the ATX job objective; the Transform agent ignores generate_ui_tests and generate_api_tests, and the IDE start dialog keeps one integration-tests checkbox. Remove the two keys added in #3020: the StartTransformRequest fields, their startTransform forwarding, and the createJob writes. generate_integration_tests and browser are unchanged and still gated on ATX_ITGEN_ENABLED. * feat(amazonq): gate ITGen on the job's generate_integration_tests instead of ATX_ITGEN_ENABLED Remove the ATX_ITGEN_ENABLED environment variable. The LS now runs its ITGen code only for jobs whose objective has generate_integration_tests: true: ITGen HITL selection and OpenHitls, completeHitlWithTestResults, diffs at any depth, and downloadOriginalCode. Every other job behaves as before ITGen. - createJob always writes generate_integration_tests when the client sends a real boolean, and browser only with integration tests. It remembers the job's flag, so no extra call is needed for jobs this LS created. - For other jobs (resume, job history, beam) the flag is read once from the job objective: getTransformInfo asks GetJob for the objective until the job is known, and isItGenJob does the same outside a poll. A failed GetJob isn't cached. * refactor(amazonq): move the ITGen job gate to its own module and bound it - ItGenJobGate (itgenJobGate.ts) owns the per-job generate_integration_tests flag: createJob records it, other jobs are read once from their objective, and a failed read isn't remembered. - The map is capped at 200 jobs (oldest dropped) and a job is forgotten in clearJobCache, on terminal statuses and stop. - No per-poll shared flag: each check looks up its own job id, so overlapping getTransformInfo calls for different jobs can't read each other's value. * fix(amazonq): keep each ITGen project's test runs in its own folder (#3031) * fix(amazonq): keep each ITGen project's test runs in its own folder The agent can use the same run ids (r1, r2, p1) for every project of a solution, so a later project's run unpacked its tests over an earlier project's. Test-run tests now go to artifactWorkspace/<job>/itgen/<project>/<runId>/tests (itgen/<runId>/tests when the request has no project), and only the project's own earlier runs are cleaned up. A project that isn't a single folder name is refused. * fix(amazonq): return the plan while an executing job waits on chat handleAwaitingHumanInput took a job for one still being planned unless its first top-level step had sub-steps. When that step is a leaf (for example "Assess Solution"), an executing job waiting on a chat question went down the planning path, which returns no plan, so the IDE kept showing a stale plan. A plan now exists once any top-level step has sub-steps. * Revert "fix(amazonq): return the plan while an executing job waits on chat" This reverts commit 4e2e6edddc7cb0d0519bb00ef70423df80140e91. * fix(amazonq): give any ITGen project name a safe folder, and reword internal references - An empty project is no project. A project name that isn't a plain folder name (a space, parentheses, a leading underscore, a Windows device name, a trailing dot) gets a safe folder with a hash of the name, so its test run still works instead of failing. - Comments in atxTransformHandler.ts describe past issues without internal ticket ids or customer names. * fix(amazonq): keep returning the plan while a job waits on chat or a step review (ITGen) (#3021) * fix(amazonq): keep returning the plan while a job waits on chat with no HITL open (ITGen) handleAwaitingHumanInput chose the planning phase whenever the plan's first top-level step had no sub-steps. When a job is AWAITING_HUMAN_INPUT with no HITL open, the agent is waiting on a chat answer (for example "anything else, or mark the job complete?" at the end of the job). The planning branch returns no TransformationPlan, so the IDE stopped seeing step statuses: with ITGen it never saw Local Verification finish, and the apps it had launched kept running while the job waited on chat. With no HITL open and a plan that has steps, take the execution path, which returns the plan. A planning HITL (plan review) carries a tag, so it still takes the planning path. * fix(amazonq): take the execution path for step reviews, not for a failed HITL lookup (ITGen) handleAwaitingHumanInput picks the planning or execution phase from the plan's shape (does the first step have sub-steps?), and the previous commit made an exception for "no HITL open". Two gaps remained: - A step review HITL ({stepId}-review) on a plan whose first step has no sub-steps still took the planning path, which returns no plan and no StepInformation, so the IDE couldn't show the step review. A HITL whose tag is the review tag of a step in the plan now takes the execution path, whatever the plan's shape. - getHitlAgentArtifact returns null both when no HITL is open and when the lookup fails, so a failed ListHitls was read as "no HITL open". During plan review that skipped the planning path, which looks the HITL up again and so usually recovers in the same poll. getHitlAgentArtifact now reports a failed lookup to callers that ask (optional `lookup` argument), and the no-HITL exception applies only when ListHitls answered with nothing open. * test(amazonq): cover the sibling-repo LBV case of "no HITL to surface" (ITGen) getHitlAgentArtifact also returns null, without setting lookup.failed, when the request is beam-scoped and the only open HITLs are local-build-verification HITLs outside the scope (a sibling repo's, on a multi-repo beam job). handleAwaitingHumanInput reads that as "no HITL to surface" and returns the plan alone, as the EXECUTING and PLANNING branches already do for that case. Before this PR, a plan whose first step has no sub-steps sent it down the planning path, whose lookup isn't beam-scoped, so the response carried the sibling's tag without its step id or the plan. The behaviour doesn't change. This documents the case in getHitlAgentArtifact's JSDoc and in the phase comment in handleAwaitingHumanInput, renames noHitlOpen to noHitlToSurface, and adds tests: - handleAwaitingHumanInput, through the real getHitlAgentArtifact: a beam-scoped request whose only open HITL is a sibling's LBV, on a plan whose first step has no sub-steps, gets the plan and no HitlTag, HitlTaskId or StepInformation, and ListHitls is called once. Fails against feature/ITGen-RIV, where the planning path returns the sibling's tag. - getHitlAgentArtifact: that case returns null and leaves lookup.failed unset. * chore(amazonq): remove internal ticket references and a customer name from netTransform (ITGen) This repo is public. Comments in atxTransformHandler.ts and atxTransformHandler.test.ts cited internal ticket references and named a customer. Each comment keeps its technical meaning: the ticket references are dropped, and the customer is now "a customer-reported edit clobber". The applyChanges test fixture's job id is now 'job-edit-clobber'. Comments and a test fixture id only; no behaviour change. --------- Co-authored-by: David Topchyan <davetop@amazon.com> * feat(amazonq): model the 1.1 testOrder field on the test-run request and summary (#3032) ## Problem `atxModels.ts` says its ITGen interfaces "match C# AtxTestRunRequest / AtxTestRunSummary ... in the VS extension", but neither has the `testOrder` field schema 1.1 sends, and the `AtxTestRunRequest` docblock still lists only `AB_BASE_URL`, `AB_SIDE` and `AB_RUN_ID` as the variables the IDE sets. Nothing breaks today: the agent's `request.json` is downloaded and handed to the IDE by path, and a TS interface is compile-time only, so `JSON.parse` keeps `testOrder` whether it's declared or not. But the two copies of the contract that claim to match each other now differ, so the next change here that types or validates these payloads would drop a field the agent relies on. ## Changes - `AtxTestRunRequest.testOrder?: string` — optional, added in 1.1. `pre_run_loop.py` sends it as `default`, `reverse` or `shuffle:<seed>`; the agent asks for a second order before it freezes a suite, so the IDE sets `AB_TEST_ORDER` from it. - `AtxTestRunSummary.testOrder?: string` — echoed back. `evaluate-pre-run-request.schema.json` says "Write testOrder in summary.json when the run used AB_TEST_ORDER", and EVALUATE_PRE_RUN tells the two orders of a suite apart by it. - The `AtxTestRunRequest` docblock now lists `AB_SCREENSHOTS_DIR` and `AB_TEST_ORDER` alongside the three it already named. Types only — no handler reads or writes these fields, and `completeHitlWithTestResults` is untouched. ## Testing - New `atxModels.test.ts` case: a request with `testOrder: 'reverse'` round-trips through JSON with the field, and one without it serializes no `testOrder` key (a 1.0 payload). - `atxModels.test.ts`: 11 passing. - `tsc --noEmit` on `aws-lsp-codewhisperer`: clean. ## Related - aws-toolkit-visual-studio-staging#3011 is the IDE side that reads `testOrder` and sets `AB_TEST_ORDER`, `AB_SCREENSHOTS_DIR` and the corrected `AB_SIDE`. The two are independent: #3011 works without this (the field arrives in `request.json` either way), and this is types only. * feat(amazonq): run ITGen for beamed repos that opt in via the beam-map (#3033) * feat(amazonq): run ITGen for beamed repos that opt in via the beam-map - BeamedRepoInfo.GenerateIntegrationTests from the beam-map entry (false on the beam-status path) - the parent web job counts as ITGen when any beamed repo opts in; a beamed poll reads the beam-map in the background, so it survives an LS restart without delaying the poll - beamed sessions never surface or list a sibling repo's integ-* HITLs - downloadOriginalCode also writes .atx-job-id (plain job id), which the VS coordinator checks * fix(amazonq): move the beamed-repo ITGen gate into ItGenJobGate and address review - ItGenJobGate.isBeamItGenJob: capped like the job map; retries after 60s when the beam-map wasn't read (throttle cooldown, scan cut short); background read failures are logged - scope the planning-phase HITL lookup so a sibling repo's HITL isn't picked there either - read and write the original-code markers with fs.promises * feat(amazonq): apply a beamed repo's post-beam step diffs and track the customer's changes (#3037) * feat(amazonq): apply a beamed repo's post-beam step diffs and track the customer's changes - a beamed poll applies completed step diffs under the loaded repo's card (not LBV, not pre-beam) - an opted-in beamed repo gets the customer-changes manifest on its first poll - integ-* HITLs aren't surfaced while a beamed job's gate is unknown - a beam-map without an opt-in isn't re-read this session; no worklogs without a solution root - completeHitlWithTestResults uses the beam-aware gate * fix(amazonq): address review of the beamed-repo downlink - the repo card's own step isn't applied, only the steps under it (beamApplyStepIds) - the step selection and the manifest file walk move to beamRepoFiles.ts, with unit tests - the manifest is written in the background, once for overlapping polls - a NuGet packages folder is skipped, a source folder named packages isn't - tests: a customer edit after Load reaches workspace/, a failed beamed apply marks only that step * fix(amazonq): track a beamed repo's changes before the first apply Address the second review of the beamed-repo downlink: - An apply waits for the pending customer-changes manifest write, so the files it adds (for example a generated test project) are tracked. - Every loaded beamed repo gets the manifest, opted in or not, matching the downlink, which applies post-beam steps to each of them. - One Local Build Verification check (case-insensitive, anywhere in the name) for the downlink selection and the handler's LBV lookup. - The manifest walk skips a folder it can't read instead of failing, and logs when it stops at the file cap. * fix(amazonq): read every ITGen beam-map, and retry one that can't be downloaded (#3040) * fix(amazonq): retry the ITGen beam-map read when a candidate can't be downloaded A beam-map that's listed but can't be downloaded (ResourceNotFound until the web side publishes it to the user-facing bucket) was treated as "not the beam-map". The scan then counted as complete, and the gate cached "not opted in" for the session. Now, without a beam-map read, an undownloadable candidate makes the answer "can't tell", which the gate retries, and the scan logs a warning naming the artifacts. * fix(amazonq): back off the beam-map retry and warn once per job Address the review of the beam-map retry: - The gate doubles the wait after each read that couldn't tell (60 s up to 15 min) and starts over once it gets an answer, so beamed sessions whose beam-map can't be downloaded don't rescan every minute. - The scan warns once per job and set of undownloadable candidates. - Say why a beam-map that was read decides, and test a failed download. * fix(amazonq): merge every beam-map and cap the reads that can't tell - The web writes a new beam-map on each beam batch, and ListArtifacts order isn't chronological, so keeping the last one listed could drop the repos of a later batch. Merge every beam-map; per repo, the newest entry wins. - After 5 beam-map reads in a row that couldn't tell, treat the job as not opted in for the session (logged once), instead of retrying forever: a beam-map the service doesn't publish never becomes downloadable. * fix(amazonq): count only unconfirmed beam-map reads towards the cap Address the second review of the beam-map retry: - The beam-map reader tells "unconfirmed" (the scan finished without a beam-map while a candidate went unread) from "not read" (throttled, cut short, or failed). Only unconfirmed reads back off and count towards the cap; a read that didn't happen is retried every 60 s, as before. - A scan that left candidates past the 25-candidate cap and read no beam-map is unconfirmed, not "not opted in". * fix(amazonq): unconfirmed only for finished scans, and without an opt-in read Address Xuening's review of the beam-map retry: - A throttle during the scan makes it unfinished, like the throttle cooldown: retried, never counted towards the cap. - A beam-map that was read but doesn't opt in no longer decides while another candidate went unread: that one can be a newer beam-map that opts in, so the answer is unconfirmed. - Only a finished scan with an answer clears the warn-once record, and the record is keyed by the sorted artifact ids. * fix(amazonq): keep directories out of the transform source files manifest (#3052) * fix(amazonq): keep directories out of the transform source files manifest A Web Site project's ProjectPath is its folder, so it went into source-files.json as a file: it could show up as a modified file and break the review uplink zip. The manifest now leaves out any path that is a directory, a checkpoint never adds one, and getModifiedFilesSinceCheckpoint never reports one, also from a manifest written before this change. * fix(amazonq): check only project paths for folders, without a blocking stat Review on #3052: the folder filter called fs.statSync on every listed path on the startTransform request path. writeSourceFilesManifest is now async and checks only ProjectPath entries, the only ones that can be a folder (a Web Site project), with fs.promises.stat. updateSourceFilesManifest no longer stats; getModifiedFilesSinceCheckpoint, which already stats each path, now counts only files (isFile, as listBeamRepoFiles does), so a folder a checkpoint adds is never reported as modified. * fix(amazonq): scan beam-map before beam-status in multi-repo beams (#3057) * fix(amazonq): scan beam-map before beam-status in multi-repo beams For a multi-repo beam with N repos, ListArtifacts returns N beam-status-* JSON files plus the actual beam-map. The candidate scan tried them in arbitrary order within a 15 s budget; with many candidates the beam-map could fall outside the budget or be throttled, leaving the scan without the map and causing the IDE to load repos without their original artifact id. Two changes: - Skip candidates whose path matches beam-status-*; they never hold the beam-map and each wasted candidate narrows the scan budget. - Sort remaining candidates by path length, shortest first (pathless candidates first). The beam-map has no path in ListArtifacts, so it is now always tried first. * fix(amazonq): move BEAM_STATUS_RE inline, use binary sort key, add test Address code review findings on fix/beam-map-scan-priority: - Remove function-scope BEAM_STATUS_RE variable; use the literal inline. - Replace raw path-length sort key with binary pathless/has-path predicate so only the pathless vs has-path distinction is expressed, not arbitrary ordering within the has-path group. - Add test: 3 repos, 3 beam-status-* artifacts listed before the pathless beam-map — the beam-map is still found first because status files are excluded from allCandidates. * fix(amazonq): treat scan timeout as unconfirmed, add budget test, scan-summary log Root cause confirmed from box logs (job 401bf8f4): tfm= is empty on ALL lines across 13 hours of 30-s rescans for the 3-repo beam. The beam-map was never read because the old code included 8 beam-status-* JSON files as scan candidates; each download consumed ~2 s of the 15 s budget, leaving none for the pathless beam-map listed last. Three additions on top of the beam-status filter + pathless-first sort fix: 1. Scan timeout -> 'unconfirmed' (not undefined) readBeamOptIn now returns 'unconfirmed' when discoverBeamedRepos reports scanAborted (scanCutShort=true). The gate counts this toward beamMaxReadsThatCannotTell (5) and uses exponential back-off (60s, 120s, 240s, ...), so a job that genuinely cannot serve its beam-map gives up after ~16 minutes instead of retrying flat forever. A throttle mid-scan stays undefined (not counted) since it is a transient infrastructure hiccup. 2. New test: 8 beam-status files + 1 pathless beam-map, each download "takes" 2s (sinon fake clock). After the filter fix only 1 candidate remains (the beam-map); 1 download is attempted, scan not cut short, repo returned with GenerateIntegrationTests=true. 3. Scan-summary INFO log One [BEAM-PKG] scan-summary line per discoverBeamedRepos call: result label (found-opted-in / unconfirmed / timed-out / throttled-during-scan / not-opted-in / no-scan), candidate count, unreadable count, beam-map found, repos returned. * fix(amazonq): throttle mid-scan also counts as unconfirmed (gap from review) A throttle that fires during the beam-map candidate scan makes the scan just as incomplete as a budget timeout — the beam-map may not have been reached. Extend scanAborted to include throttledDuringScan so the gate uses exponential back-off in both cases rather than retrying flat every 60 s forever. Update the existing test that expected undefined for the throttle case to expect 'unconfirmed'. * fix(amazonq): retry transient CreateArtifactDownloadUrl errors and surface the reason A Load failed 118 ms after start with "No presigned URL for beam artifact" and the same Load succeeded minutes later: a transient non-throttle error on the first CreateArtifactDownloadUrl call returned null with no retry, and the caller replaced the real reason with a fixed string. - createArtifactDownloadUrl: also retry transient errors (5xx, InternalServerException, ServiceUnavailableException, network errors, "unknown error") with the same jittered backoff and 4-attempt cap. Not found / access denied / validation / other 4xx still fail at once; throttle handling is unchanged. A response without a URL is retried once, then returns null. - Remember the last failure reason per artifact; downloadBeamArtifact and downloadOriginalCode now return "Could not get a download URL for the ... (<ErrorName>: <message>)" or "The service returned no download URL for the ...". URLs are stripped from the message. Other callers still get null as before. - Tests for retry classes, attempt counts and the surfaced error. * fix(amazonq): address review: explicit opt-in on aborted scan, log unknown download-URL errors, keep transient reason - readBeamOptIn: a beam-map read before the scan was cut short that opts a repo in now returns true (was 'unconfirmed'), and remembers the opt-in itself instead of relying on discoverBeamedRepos' side effect. discoverBeamedRepos returns optInFound for this. - classifyDownloadUrlError: any 5xx is transient whatever its name. An unrecognized service error is still treated as permanent, but is logged once per name ("[BEAM-PKG] CreateArtifactDownloadUrl: unrecognized error name=<X> status=<code> - treated as permanent"). - When an attempt fails and the last one returns no URL, the earlier reason is kept: "The service returned no download URL for the beam artifact (after an earlier error: <Name>: <message>)". The reason is cleared on success. - downloadBeamArtifact returns ErrorCode 'InvalidDestination' for a refused destination, so the IDE doesn't have to match the message. - Tests for each. * fix(amazonq): retry AccessDenied UnknownError on download URL CreateArtifactDownloadUrl treated every AccessDeniedException as permanent, so a denial with no real reason (message "UnknownError") failed the original-code download on its first attempt, though the same artifact downloaded fine minutes later. An AccessDeniedException or 403 whose message is empty or "UnknownError" is now classified as throttling: it gets the same bounded jittered retry (4 attempts) and starts the 90 s beam-map scan cooldown, since a call storm has also provoked such denials. One with a real reason stays permanent. * chore: merge main into feature/ITGen-RIV (brings AWS Transform IAM auth) (#3053) * chore(release): release packages from branch main (#2959) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: bump agentic version: 1.83.0 (#2973) Co-authored-by: aws-toolkit-automation <> * chore: merge feature/OHI fixes to main (#2978) * fix: stop pinned context leaking to new chat windows (#2786) addPinnedContext aliased the shared module-level DEFAULT_PINNED_CONTEXT array and then mutated it with unshift/push. Pinning context in one tab therefore polluted the default, so every new chat window inherited that pinned item and it could not be removed. getPinnedContext also returned the shared default array directly. Copy the default array in both places so pinning in a tab no longer mutates the shared default. Adds a regression test. (cherry picked from commit e31138996f5720cf2b7244afdba05f897026ed3e) * fix(amazonq): stop memory bank analysis from blocking the language server (#2927) The memory bank TF-IDF step stored dense, vocabulary-wide vectors and built a union Set of both vectors for every one of the N^2 file pairs. On a large workspace this ran for over a minute synchronously on the language server event loop, so other requests, such as a new chat tab's pinned context and rules, were not handled until it finished. - Build sparse TF-IDF vectors with precomputed norms, count document frequency once per document, and compute only the upper triangle of the cosine matrix. Results are unchanged. - Yield to the event loop periodically during the analysis. - Fix the "20KB" size filter, which compared line counts instead of characters and let multi-megabyte single-line files through. * refactor(amazonq): clarify cosine similarity variable names (cherry picked from commit c812bea34018486f3e7026da74fc480682d50591) * fix(amazonq): match recorded approvals for Windows paths(#2939) isPathApproved normalized separators with a pattern that only matched doubled backslashes, so Windows paths never matched approvals recorded for a parent folder or for the same path in a different separator form. Normalize separators and compare paths consistently, and add tests for multi-path reads and Windows-style paths. (cherry picked from commit a4941a4f5cab5f1f40d03ce8eb05f7ca280eba57) * fix(amazonq): restore MCP permissions for legacy and duplicate servers (#2936) MCP 'Always Allow' reverted to 'Ask' after every restart or MCP refresh for servers declared in a legacy mcp.json. updateServerPermission writes the '@server/tool' entries into agents/default.json but deliberately omits the server definition, while loadAgentConfig only re-applied '@'-prefixed entries while iterating the same file's mcpServers block. Legacy servers have no such entry, so their permissions were dropped on every load; duplicate workspace/global servers hit the same gap because they 'continue' before the permission pass. Stash server-scoped permission entries during the per-file pass and drain them for every server that actually loaded, once agent, legacy and registry servers are all known. (cherry picked from commit 1dd370212771dfe33a36d352059063fa61ffa4ef) * fix(amazonq): honour configured MCP tool call timeout (#2935) * fix(amazonq): pass configured MCP timeout to the SDK request options MCP tool calls were capped at the SDK's 60s default request timeout because McpManager.callTool never passed RequestOptions to client.callTool. A configured timeout above 60s only armed the outer Promise.race, which can shorten but never extend the deadline, so the SDK cancelled first with 'MCP error -32001: Request timed out'. timeout: 0 ('no timeout') was capped at 60s for the same reason. Resolve the effective timeout once and hand it to the SDK, mapping 0 to the largest value setTimeout honours and falling back to the 60s default (with a warning) for negative, non-finite or over-large values. * test(amazonq): type MCP warning logger arguments (cherry picked from commit 92ca07299c7453601498bb70d459236b6f7707bf) * fix(amazonq): say so when a request fails on a usage limit (#2938) A usage-limit condition surfaced as the bare 'Request failed after 3 attempts', which is indistinguishable from generic retry exhaustion. The actionable text ('Monthly limit reached') exists only in ResponseError.data, so clients that surface ResponseError.message - as the Eclipse plugin does when the structured payload is absent - told the user nothing, prompting logout/reinstall cycles for an account quota. Name the cause in the message while keeping the attempt count for support. (cherry picked from commit 4fa62f70399f367668c7b528c1af7e917eb06974) * chore(chat-client): use Mynah UI 4.40.5 beta (#2955) (cherry picked from commit d8759bb55136f2503a595d352444be39e72d2194) * fix(amazonq): mark oversized file context as truncated instead of cutting silently (#2871) File content added as chat context is capped at workspaceChunkMaxSize with a plain substring, so the model receives only the beginning of large files and has no way to know the file continues. It then reports the wrong file size (e.g. "this file only has 251 lines") instead of reading the rest with its tools. Add truncateContextContent() which appends an explicit truncation marker (including the real character count) while keeping the result within the same size budget, and use it for innerContext in AdditionalContextProvider. Add unit tests. (cherry picked from commit 2fa273711cf60a3f76235910bfbaebbd4facf465) * chore(chat-client): bump mynah-ui to 4.40.5 (cherry picked from commit 5be2d6b4f7dbc20d30ece7fe595634391a7dcdde) --------- Co-authored-by: Laxman Reddy <141967714+laileni-aws@users.noreply.github.com> * feat: AWS Transform: IAM (SigV4) authentication in the language server (#2948) * feat(amazonq): add IAM (SigV4) auth path for AWS Transform FES calls Parallel to the existing IdC bearer flow: the IDE pushes IAM credentials via aws/credentials/iam/update and the tenant URL via aws.atx configuration, and the language server SigV4-signs FES calls when both are present. Bearer path unchanged. - AtxTokenServiceManager: getAuthType(), getIamCredentials() (reads the main credentials provider's iam slot), IAM-aware hasValidCredentials(), and an applicationUrl setting on the aws.atx section. - atxTransformHandler: addAuthToCommand() SigV4-signs on the IAM path (service transform, region from the tenant URL), headers set case-insensitively before signing; verifySession() validates IAM credentials on that path; not-signed-in fails before any network call. Secret-safe logging. - Declare @smithy/signature-v4 and @aws-crypto/sha256-js. - Tests for auth-type/credential/tenant-URL handling and bearer vs IAM vs not-signed-in signing. * feat(amazonq): clear AWS Transform IAM session on IAM credentials delete On aws/credentials/iam/delete the runtime clears the IAM credentials slot. The AWS Transform service manager now also clears the IAM tenant URL and resets its cached FES client, so no IAM session state is kept after sign-out. Uses the existing runtime notification; no new LSP method. - amazonQServer forwards IAM credential deletions to AtxTokenServiceManager. Bearer deletions keep their existing handling. - AtxTokenServiceManager handles IAM deletion. The bearer token is untouched. - Tests for the cleared state, bearer token unaffected, and IAM-only forwarding. * feat(amazonq): honor client declared AWS Transform auth mode Add an aws.atx authType setting (iam or bearer) that the client sends with each sign-in. When declared, getAuthType reports only that mode, so stale credentials of the other type are never used to call FES. Switching to bearer clears the IAM tenant URL and resets the cached FES client through the same path as the IAM credentials delete. The IAM credentials delete also resets a declared iam mode. Without a declared mode the auth type is derived from the credentials present, as before. * feat(amazonq): add AWS Transform session validation command Add aws/atxTransform/validateSession, a read-only check the client runs before reporting IAM sign-in as connected. It makes one ListWorkspaces call with maxResults 1 through the same signing, tenant URL and permission path as real requests, and never goes through the create path. listOrCreateWorkspace is unchanged. Failures are classified where the typed SDK error is available, into ExpiredCredentials, MissingPermission, TenantNotFound, NetworkOrService or Other. The response carries only the reason, error name and HTTP status, and only those are logged, never the error message or credential values. FES returns AccessDeniedException for expired or invalid security tokens and for signature mismatches, so AccessDeniedException is checked against reason INVALID_SESSION and two fixed AWS phrase lists, kept together in atxSessionValidation.ts. A signature mismatch is reported as Other. * fix(amazonq): classify SigV4 INVALID_SESSION errors instead of reporting expired FES returns AccessDeniedException with reason INVALID_SESSION on the SigV4 path for several cases that are not expired credentials, so session validation showed an expired message for all of them. - New reasons, matched on the FES message (lowercase phrase match): - IamAuthNotEnabled: SigV4ProfileResolutionHandler, SigV4 access is not enabled for this profile (IAM authentication off in the Transform profile settings). - IamAuthNotEnabledForAccount: SigV4FeatureFlagHandler, SigV4 access is not enabled for account. - TenantMismatch: SigV4ProfileResolutionHandler, credentials do not match the provided tenant. - Expired and invalid security token phrases still map to ExpiredCredentials, and signature mismatch still maps to Other. - INVALID_SESSION with an unrecognized message now maps to Other instead of ExpiredCredentials. If FES rewords a message, it falls back to Other. - The FES message is never logged or returned (the account message contains the account ID); only the reason, error code and status are. Tests for each reason, the fallbacks, and that no message text or account ID leaks into the result or the log. * fix(amazonq): return error code and status for failed AWS Transform commands Failed AWS Transform commands returned only an error flag and message, so the IDE could not tell AccessDenied apart from other failures and kept polling. Add errorCode and statusCode to the error result, and return the GetJob error code and status with JOB_NOT_FOUND. The error message is unchanged and never parsed by the client. * fix(amazonq): validate the AWS Transform tenant URL for IAM (SigV4) auth The aws.atx application URL is kept only when it is an https AWS Transform URL in a region with an FES endpoint, reduced to its origin. On IAM, the region comes only from a valid URL (no default region fallback), and requests are not signed without one. The IdC path is unchanged. * chore(release): release packages from branch main (#2981) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: bump agentic version: 1.84.0 (#2989) Co-authored-by: aws-toolkit-automation <> * fix(lsp-yaml): load the schema once instead of on every request (#3017) * fix(lsp-yaml): load the schema once instead of on every request YamlLanguageService called configure() before every hover, completion, validation and format request. configure() clears the schema cache, so each request downloaded and parsed the 17.5 MB SAM schema again. This made the CloudFormation completion integ test exceed its 8s timeout on Windows runners. Configure the service once in the constructor with the same settings and a '*' file match, so the schema is fetched and resolved once per server process. * fix(lsp-yaml): reload the schema after a failed load Loading the schema once means a failed load stayed cached for the life of the process. Before, the per-request configure() cleared the cache, so the next request fetched the schema again. Record when the resolver throws, returns content that is not JSON, or the default fetch gets a non-OK response, and re-run configure() on the next request in that case only. A successful load is still fetched once, and the returned content and diagnostics are unchanged. * fix: update bundled Node.js to 24.22.2 for CVE-2026-111497 (#3026) Node.js 24.9.0 is affected by CVE-2026-111497, which is fixed in Node.js 24.22.1. The 24.9.0 pin was a temporary workaround for a Node.js release issue that has since been resolved. * ci: open a pull request when a newer bundled Node.js release is available (#3027) A daily workflow now opens a draft pull request that updates NODE_SEMVER when Node.js publishes a newer release on the bundled major line, after checking the new files against their published checksums. download-node.sh now verifies the SHA-256 of each file, stops on HTTP errors, and stops when a platform file is missing from the release. * chore(release): release packages from branch main (#3022) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: bump agentic version: 1.85.0 (#3034) * fix: address security issues (#3041) * fix(identity): validate section and setting names when saving profiles - Accept only the profile and sso-session settings that the store loads. - Require section names that the AWS SDK reads back as the same section. - Write each section header and setting on a single line. * fix(identity): preserve shared config file modes when saving - Create the rewritten file with the mode of the file it replaces, or 0600 for a new file. - Keep credentials files owner-only, including the backup. - Create a new shared config directory with 0700. * fix(amazonq): limit diff and similarity work for large edit suggestions - Compute the accepted-edit character diff with two rows instead of a full table, skip the common prefix and suffix, and approximate it when the table would exceed 1,000,000 cells. - Compare rejected edits by edit distance only up to 2,000 characters. Longer edits match only an identical rejection, which is unchanged for the default threshold of 1.0. * fix(amazonq): keep workspace rule resources inside the workspace - Load absolute resource paths only from the global agent config. - Load workspace rule files only from inside the workspace folder. - Log each resource that is skipped. * fix(amazonq): reserve built-in tool names for MCP tool registration (#2982) * fix(amazonq): reserve built-in tool names for MCP tool registration MCP tool names came from a server's tools/list and were used in their bare form whenever the name was not already in the collision set. That set was not seeded with the built-in tool names, so a server could register under one and replace the built-in entry. createNamespacedToolName now takes a reservedNames set, never returns a reserved name from any naming branch, and discards a persisted name mapping that points at one. Both call sites seed the set from agent.getBuiltInToolNames() so the reservation tracks tool registration. MCP cleanup paths skip built-in names. * fix(amazonq): dispatch tool confirmation on the registered tool name processToolConfirmation resolved its switch subject as toolType || toolUse.name. The MCP branch passes the server's original tool name as toolType for display, so a tool advertised as fsRead selected the built-in fsRead card, which reads input.paths and threw "Paths array cannot be empty." before any approval card was shown. The same name also drove the isStandardTool classification and the executeBash body check. Dispatch and classification now use toolUse.name, the registered name, which is namespaced for MCP tools. toolType stays display-only. * fix(amazonq): guard optional tool name in confirmation classification ToolUse.name is string | undefined, so the isStandardTool check needs the undefined guard that the previous expression carried. Restores it on the dispatch name. An undefined name classifies as non-built-in. * test(amazonq): cover reserved built-in names in MCP tool naming Adds cases for every built-in name, two servers advertising the same built-in name, re-registration reusing the namespaced name, truncation of a long server name, the numeric-suffix fallback skipping a reserved candidate, and the default empty reserved set keeping prior behavior. * test(amazonq): cover sanitized names that collapse onto a built-in name sanitizeName strips disallowed characters, so an advertised name such as "fs Read" becomes "fsRead". The reserved check runs on the sanitized form; this pins that behavior. * fix(amazonq): key remaining tool-name branches on the registered name getUpdateToolConfirmResult resolved its subject as originalToolName, which is the server's original tool name on the MCP approval path. A tool advertised as executeBash therefore rendered the shell card, which reads input.command, and one advertised as a filesystem tool selected those cases. Dispatch now uses toolUse.name; originalToolName and toolType remain display-only. The built-in path already passes toolUse.name, so built-in rendering is unchanged. getMessageIdForToolUse no longer branches on toolType, so a server cannot steer a card to the built-in executeBash message id. The parameter is now unused and is removed. The Built-in tool list in mcpEventHandler selected tools by excluding raw MCP tool names, which hid a built-in whose name an MCP server also advertises. It now selects by getBuiltInToolNames(). * fix(amazonq): keep unclassified tools in the Built-in list The previous commit selected the Built-in list purely by getBuiltInToolNames(), which dropped the three LSP tools that register without a ToolClassification and were previously listed. The filter is now additive: a built-in is always listed, and any other tool is listed unless it matches an MCP tool name. The MCP name set also includes the namespaced names tools are actually registered under, so a colliding MCP tool is excluded rather than appearing alongside the built-in it shadowed. * test(amazonq): cover MCP tools whose name matches a built-in tool Drives processToolUses with an MCP tool registered as probe___fsRead whose server-advertised name is fsRead, and asserts the server's name never selects built-in behavior: the confirmation card is the MCP summary card rather than the built-in read card, the built-in path validation error does not surface, the MCP permission is consulted under the server and original tool name, runTool receives the registered name, and the accepted-result card is the MCP card. A second case registers probe___executeBash and asserts no card renders as the shell command card and the confirmation uses the plain toolUseId rather than the shell tool's message id. * fix(amazonq): reserve statically dispatched tool names * fix(amazonq): require workspace containment before opening chat card files (#2906) * fix(amazonq): require workspace containment before opening chat card files onFileClicked passed card paths to showDocument with no containment check. The fsRead branch opened params.filePath directly, the default branch opened params.fullPath directly, and resolveAbsolutePath joined a relative filePath onto the workspace root, so a traversing relative path escaped as well. Card paths originate in model tool results and service findings, so a manipulated response plus one click opened any readable file and fed it to completion context. All three open paths now go through openIfAllowed, which canonicalizes the path and reuses requiresPathAcceptance: a file opens only when it is inside a workspace folder or the user already approved it for the card's tool in this session. The user prompts directory is allowed for .prompt.md files, which resolveAbsolutePath deliberately resolves there. Refused clicks are logged and otherwise ignored. Tests cover an inside file, an outside fullPath, an escaping relative path, an fsRead card for an unapproved and an approved outside path, an fsWrite approval not unlocking an fsRead card, a prompt file in the prompts directory, and a non-prompt file in that directory. * fix(amazonq): prompt before opening an out-of-workspace chat card file The previous commit refused such opens outright and only logged. A card can legitimately point outside the workspace, for example a findings path the user wants to inspect, so the open is now gated by a warning dialog instead of dropped. openIfAllowed shows a showMessageRequest warning with Open and Cancel when requiresPathAcceptance requires acceptance. The message leads with the specific reason the check returned, such as the sensitive-file warning, and names the canonical path. Choosing Open records the path for the card's tool in the session's approved paths, so a repeat click or a later tool use on the same path does not prompt again. Cancel or dismissal aborts the open. In-workspace, already-approved, and prompt directory paths open without a dialog as before. MessageType and MessageActionItem are imported from the protocol module, which already supplied MessageType to this file; a second import from server-interface produced a duplicate identifier. Tests cover the dialog contents and action order, Open opening the file, Cancel and dismissal refusing, the choice being remembered across clicks, the sensitive-path reason surfacing in the dialog, and existing approvals suppressing the dialog. * fix(amazonq): normalize Windows paths in approval lookup Match single backslash separators consistently with session approval storage. Normalize Windows paths before sensitive-location pattern checks. Add session round-trip tests for drive and UNC paths and use native separators in the sensitive-path fixture. * fix(amazonq): open file links from chat answers in the editor (#3016) * fix(amazonq): open file links from chat answers in the editor * fix(amazonq): handle Windows file links * fix(amazonq): detect sensitive Windows paths * fix(amazonq): separate file-open consent * fix(amazonq): refine chat file-link handling - Keep encoded '#' and '?' in file names and accept 'file.ts:10' line suffixes. - Tell the user when a link is not opened or a linked file is not found. - Keep link-click telemetry for links handled inside chat. - Retain an fsRead Open choice only for paths an fsRead call requested, and say so in the dialog. * fix(amazonq): bound not-found message and match home-relative fsRead paths * fix(amazonq): retain fsRead Open choice only for regular files * fix(amazonq): check regular files with node fs for fsRead retention * test(amazonq): cover forward-slash and ~user fsRead inputs * fix(amazonq): require exact approval for sensitive paths - Credential and system paths need their own approval, not a parent directory's. This also applies to the executeBash working directory. - A file with more than one hard link needs approval in fsRead, fsWrite, fsReplace and grepSearch, and as an executeBash file argument. An approval covers such a file only while it is the same file with no more names. - Keep executeBash file checks for approved paths. - Record an approved path after the tool succeeds, and for executeBash only when the command exits normally. An executeBash approval allows the working directory only for an out-of-workspace prompt of a read-only command, and never the home folder, a folder above it, or a hidden or settings folder. * fix(amazonq): show the full command in shell command cards - Use a code block fence that is longer than any run of backticks in the command, in the approval card and the other shell command cards. * fix(amazonq): ask before modifying workspace configuration files - Ask before fsWrite or fsReplace modifies files in .amazonq, .vscode, or .git folders in the workspace, including linked folders, the AmazonQ.md rules file, or the global Amazon Q configuration when the workspace includes it. - Memory bank generation can still write its own files, only in the request that asked for the memory bank. * test: run every unit test file to completion * feat(amazonq): start local MCP servers only in trusted workspace folders (#3019) * fix(amazonq): explain why local MCP servers wait for workspace trust (#3039) List servers held by the workspace trust check under "Waiting for trust" with what starts them, instead of under Disabled, and keep such a server when it is saved. * fix(amazonq): stricter checks for chat file links and configuration files (#3042) fix(amazonq): stricter checks for chat file links and configuration files --------- Co-authored-by: hezelin <hezelin@amazon.com> * chore(release): release packages from branch main (#3045) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: bump agentic version: 1.86.0 (#3050) Co-authored-by: aws-toolkit-automation <> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: XiaowenMaoA <107279155+XiaowenMaoA@users.noreply.github.com> Co-authored-by: Dung Dong <dungdong@amazon.com> Co-authored-by: Laxman Reddy <141967714+laileni-aws@users.noreply.github.com> Co-authored-by: tomar-gunjan <tomgun@amazon.com> Co-authored-by: Boyu <bywang@amazon.com> Co-authored-by: invictus <149003065+ashishrp-aws@users.noreply.github.com> Co-authored-by: hezelin <hezelin@amazon.com> * docs(amazonq): record the launch request's build configuration in the ATX models (#3072) AtxAppLaunchApp.configuration and AtxAppLaunchResult.configuration, mirroring the C# classes in the VS extension. The IDE reads request.json from the downloaded artifact itself, so these interfaces are the contract's documentation rather than something the language server parses, and no forwarding code changes: the field reaches the IDE already. The IDE side (build and start in the requested configuration, matched against the ones the project declares) is in the toolkit's companion change. * chore: merge main into feature/ITGen-RIV (Node 24.22.3, IAM auth follow-ups) (#3073) * chore(release): release packages from branch main (#2959) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: bump agentic version: 1.83.0 (#2973) Co-authored-by: aws-toolkit-automation <> * chore: merge feature/OHI fixes to main (#2978) * fix: stop pinned context leaking to new chat windows (#2786) addPinnedContext aliased the shared module-level DEFAULT_PINNED_CONTEXT array and then mutated it with unshift/push. Pinning context in one tab therefore polluted the default, so every new chat window inherited that pinned item and it could not be removed. getPinnedContext also returned the shared default array directly. Copy the default array in both places so pinning in a tab no longer mutates the shared default. Adds a regression test. (cherry picked from commit e31138996f5720cf2b7244afdba05f897026ed3e) * fix(amazonq): stop memory bank analysis from blocking the language server (#2927) The memory bank TF-IDF step stored dense, vocabulary-wide vectors and built a union Set of both vectors for every one of the N^2 file pairs. On a large workspace this ran for over a minute synchronously on the language server event loop, so other requests, such as a new chat tab's pinned context and rules, were not handled until it finished. - Build sparse TF-IDF vectors with precomputed norms, count document frequency once per document, and compute only the upper triangle of the cosine matrix. Results are unchanged. - Yield to the event loop periodically during the analysis. - Fix the "20KB" size filter, which compared line counts instead of characters and let multi-megabyte single-line files through. * refactor(amazonq): clarify cosine similarity variable names (cherry picked from commit c812bea34018486f3e7026da74fc480682d50591) * fix(amazonq): match recorded approvals for Windows paths(#2939) isPathApproved normalized separators with a pattern that only matched doubled backslashes, so Windows paths never matched approvals recorded for a parent folder or for the same path in a different separator form. Normalize separators and compare paths consistently, and add tests for multi-path reads and Windows-style paths. (cherry picked from commit a4941a4f5cab5f1f40d03ce8eb05f7ca280eba57) * fix(amazonq): restore MCP permissions for legacy and duplicate servers (#2936) MCP 'Always Allow' reverted to 'Ask' after every restart or MCP refresh for servers declared in a legacy mcp.json. updateServerPermission writes the '@server/tool' entries into agents/default.json but deliberately omits the server definition, while loadAgentConfig only re-applied '@'-prefixed entries while iterating the same file's mcpServers block. Legacy servers have no such entry, so their permissions were dropped on every load; duplicate workspace/global servers hit the same gap because they 'continue' before the permission pass. Stash server-scoped permission entries during the per-file pass and drain them for every server that actually loaded, once agent, legacy and registry servers are all known. (cherry picked from commit 1dd370212771dfe33a36d352059063fa61ffa4ef) * fix(amazonq): honour configured MCP tool call timeout (#2935) * fix(amazonq): pass configured MCP timeout to the SDK request options MCP tool calls were capped at the SDK's 60s default request timeout because McpManager.callTool never passed RequestOptions to client.callTool. A configured timeout above 60s only armed the outer Promise.race, which can shorten but never extend the deadline, so the SDK cancelled first with 'MCP error -32001: Request timed out'. timeout: 0 ('no timeout') was capped at 60s for the same reason. Resolve the effective timeout once and hand it to the SDK, mapping 0 to the largest value setTimeout honours and falling back to the 60s default (with a warning) for negative, non-finite or over-large values. * test(amazonq): type MCP warning logger arguments (cherry picked from commit 92ca07299c7453601498bb70d459236b6f7707bf) * fix(amazonq): say so when a request fails on a usage limit (#2938) A usage-limit condition surfaced as the bare 'Request failed after 3 attempts', which is indistinguishable from generic retry exhaustion. The actionable text ('Monthly limit reached') exists only in ResponseError.data, so clients that surface ResponseError.message - as the Eclipse plugin does when the structured payload is absent - told the user nothing, prompting logout/reinstall cycles for an account quota. Name the cause in the message while keeping the attempt count for support. (cherry picked from commit 4fa62f70399f367668c7b528c1af7e917eb06974) * chore(chat-client): use Mynah UI 4.40.5 beta (#2955) (cherry picked from commit d8759bb55136f2503a595d352444be39e72d2…
…/1.87.0 chore: merge agentic version 1.87.0
dungdong-aws
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Solution
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.