Uh oh!
There was an error while loading. Please reload this page.
fix(agiloft): align the integration with the documented ewws REST interface - #6556
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Core protocol fixes
Feature changes
Reviewed by Cursor Bugbot for commit 697568a. Configure here. |
Greptile SummaryThe PR aligns the Agiloft integration with its documented EW endpoint and response conventions while preserving compatibility for persisted saved-search blocks.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/tools/agiloft/ewrest.ts | Adds centralized parsing and normalization for documented EWREST assignment responses. |
| apps/sim/app/api/tools/agiloft/search_records/route.ts | Migrates search handling to EWREST parsing and now rejects assignment-free refusal responses. |
| apps/sim/app/api/tools/agiloft/select_records/route.ts | Migrates selection responses to EWREST record-ID parsing and rejects assignment-free refusals. |
| apps/sim/tools/agiloft/saved_search.ts | Preserves persisted saved-search tool resolution through an intentional retirement response containing migration guidance. |
| apps/sim/app/api/tools/agiloft/run_action_button/route.ts | Introduces the documented asynchronous action-button operation and normalizes its callback response. |
| apps/sim/tools/agiloft/utils.ts | Updates Agiloft EW endpoint builders and request parameter encoding across integration operations. |
| apps/sim/blocks/blocks/agiloft.ts | Updates the Agiloft operation catalog, inputs, and compatibility access for persisted workflows. |
Sequence Diagram
sequenceDiagram
participant W as Workflow
participant T as Agiloft Tool
participant R as Sim API Route
participant A as Agiloft EW Endpoint
W->>T: Execute configured operation
T->>R: Validated tool request
R->>A: EW request with encoded parameters
A-->>R: EWREST assignments or refusal text
R->>R: Parse and validate response shape
alt Valid EWREST result
R-->>T: success with normalized output
T-->>W: operation result
else Refusal or malformed response
R-->>T: failure with Agiloft response
T-->>W: failed workflow step
end
Reviews (2): Last reviewed commit: "fix(agiloft): fail loudly on non-EWREST ..." | Re-trigger Greptile
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…erface
The CRUD tools targeted /ewws/REST/{kb}/{table}/{id} with JSON bodies and
guessed at the response by probing `data.result ?? data` and `id ?? ID`.
Agiloft documents that path as a URL convention only -- no method table, no
example call, and no response shape -- and no known client uses it. The EW*
operation family is specified end to end, including exact response bodies, so
every operation now goes through it and parses the documented
`EWREST_key='value';` assignment format.
- EWCreate/EWRead/EWUpdate/EWDelete/EWSearch/EWSelect/EWGetChoiceLineId are
form-encoded and parsed via a shared EWREST parser; the /.json suffix is kept
only on EWAttachInfo, the one operation with a published JSON sample
- EWDelete now sends the deleteRule the docs require, defaulting to
ERROR_IF_DEPENDANTS so a delete fails rather than cascading
- EWRemoveAttachment uses GET; it does not accept DELETE
- EWSearch accepts the documented `search` saved-search label, so saved
searches are reachable for the first time
- Search query help taught AND/OR; Agiloft uses && and ||
- Add run_action_button (POST /ewws/async/EWActionButton) for approvals and
send-for-signature steps
- Drop saved_search: EWSavedSearch has no doc page, so neither its URL nor its
response could be verified and it could only ever return an empty list
- Add force on unlock, filter read fields locally since $fields is
undocumented, correct lock status to LOCKED/NO_LOCK, and stop reporting a
fabricated page size of 25…ool resolvable - EWSearch and EWSelect report an empty result set as `EWREST_id_length = '0';`, so a body with no assignments at all is a refusal Agiloft returned with HTTP 200, not an empty result. Both routes now surface it as an error instead of a successful empty list. - Re-register agiloft_saved_search as a retired tool. Removing it outright left workflows saved with operation='saved_search' deriving a tool id the registry no longer provided, which throws "Tool not found" at execution. It now fails through directExecution with a message pointing at the Search Records operation's Saved Search field, without issuing an undocumented request. It stays out of the operation dropdown so it cannot be chosen for new blocks. - Guard EWCreate and EWUpdate against oversized record data. Those operations carry field values in the query string, so a large payload hits the request line limit; the tool now explains that rather than surfacing an opaque 414.
0d6045a to
697568aComparewaleedlatif1
commented
Aug 11, 2026
waleedlatif1
commented
Aug 11, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 697568a. Configure here.
Summary
EW*endpoint family and the documentedEWREST_key='value';response format. The CRUD tools were on/ewws/REST/{kb}/{table}/{id}with JSON bodies, guessing the response viadata.result ?? data/id ?? ID— Agiloft documents that path as a URL convention only (no method table, no example, no response shape) and no known client uses it.EWDeletenow sends thedeleteRulethe docs require, defaulting toERROR_IF_DEPENDANTSso a delete fails rather than cascading. It was previously sent with no rule at all.EWRemoveAttachmentuses GET — it does not accept DELETE.EWSearchaccepts the documentedsearchsaved-search label, making saved searches reachable for the first time;queryis now optional with at least one of the two required.AND/OR; Agiloft uses&&and||.run_action_button(POST /ewws/async/EWActionButton) for approval and send-for-signature steps.saved_search.EWSavedSearchhas no doc page, so neither its URL nor its response could be verified — it could only ever return a silently empty list.forceon unlock, corrected lock status toLOCKED/NO_LOCK, filtered read fields locally since$fieldsis undocumented, and stopped reporting a fabricated page size of 25.Type of Change
Testing
40 unit tests covering the EWREST parser (every fixture quoted verbatim from Agiloft's docs), the URL builders, and the create/remove-attachment routes. Reverted each fix once and confirmed the assertions go red.
type-check,lint,integration-catalog:check,tool-metadata:checkandcheck:api-validationall pass.No live Agiloft instance was available, so this is validated against the published docs rather than exercised end to end. Two things worth a reviewer's eye: login credentials still travel in the
EWLoginquery string (documented that way, but the docs note they may go in the body), andEWTable/EWAsyncStatusremain uncovered because their doc pages 404 in the archive.Checklist