v0.6.35: additional jira fields, HITL docs, logs cleanup efficiency#4093
v0.6.35: additional jira fields, HITL docs, logs cleanup efficiency#4093waleedlatif1 merged 5 commits intomainfrom
Conversation
waleedlatif1
commented
Apr 10, 2026
- fix(tools): handle all Atlassian error formats in parseJsmErrorMessage (fix(tools): pass errorExtractor to executor and handle all Atlassian error formats #4088)
- fix(log): log cleanup sql query (fix(log): log cleanup sql query #4087)
- docs(openapi): add Human in the Loop section to API reference sidebar (docs(openapi): add Human in the Loop section to API reference sidebar #4089)
- feat(tools): add fields parameter to Jira search block (feat(tools): add fields parameter to Jira search block #4091)
- fix(agent): include model in structured response output (fix(agent): include model in structured response output #4092)
#4088) Update parseJsmErrorMessage to extract errors from all Atlassian API response formats: errorMessage (JSM), errorMessages array (Jira), errors[].title RFC 7807 (Confluence/Forms), field-level errors object, and message (gateway). Remove redundant prefix wrapping so the raw error message surfaces cleanly through the extractor.
* fix(log): log cleanup sql query * perf(log): use startedAt index for cleanup query filter Switch cleanup WHERE clause from createdAt to startedAt to leverage the existing composite index (workspaceId, startedAt), converting a full table scan to an index range scan. Also remove explanatory comment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Theodore Li <theo@sim.ai> Co-authored-by: Waleed Latif <walif6@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…#4089) Add the generated human-in-the-loop group to the docs navigation and create meta.json listing all HITL operation IDs so endpoints render in the API reference. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat(tools): add fields parameter to Jira search block Expose the Jira REST API `fields` parameter on the search operation, allowing users to specify which fields to return per issue. This reduces response payload size by 10-15x, preventing 10MB workflow state limit errors for users with high ticket volume. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style(tools): remove redundant type annotation in fields map callback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(tools): restore type annotation for implicit any in params callback The params object is untyped, so TypeScript cannot infer the string element type from .split() — the explicit annotation is required. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix(agent): include model in structured response output * fix(agent): update test expectation for model in structured response
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Logs cleanup: Reworks free-plan targeting to use a Jira tooling: Adds an optional Executor/Atlassian utils: Ensures agent structured responses include Reviewed by Cursor Bugbot for commit 3efbd1d. Configure here. |
Greptile SummaryThis PR bundles five small improvements: it adds Human-in-the-Loop docs to the API reference sidebar, optimises the log-cleanup route by collapsing two sequential DB round-trips into a single correlated subquery (and corrects the retention filter from Confidence Score: 5/5Safe to merge — all remaining findings are P2 style issues that do not affect correctness or runtime behaviour. All five changes are self-contained and correct. The log-cleanup refactor is a clear efficiency win (one DB round-trip instead of three) with no logic regressions. The agent-handler fix is verified by a new test assertion. The only finding is non-TSDoc inline comments in apps/sim/tools/jsm/utils.ts — non-TSDoc inline comments should be removed per project standards. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[GET /api/logs/cleanup] --> B[Build freeWorkspacesSubquery\nworkspace LEFT JOIN subscription\nWHERE subscription.id IS NULL]
B --> C{Batch loop\nbatchesProcessed < MAX_BATCHES}
C --> D[SELECT logs WHERE\nworkspaceId IN subquery\nAND startedAt < retentionDate\nLIMIT 2000]
D --> E{logs.length > 0?}
E -- No --> F[hasMoreLogs = false\nExit loop]
E -- Yes --> G[Archive to storage]
G --> H[Delete files from storage]
H --> I[Delete log from DB]
I --> J[batchesProcessed++]
J --> C
F --> K[Cleanup orphaned snapshots]
K --> L[Return JSON response]
Reviews (1): Last reviewed commit: "fix(agent): include model in structured ..." | Re-trigger Greptile |
| // JSM Service Desk: singular errorMessage | ||
| if (errorData.errorMessage) { | ||
| return `JSM Forms API error: ${errorData.errorMessage}` | ||
| return errorData.errorMessage | ||
| } | ||
| // Jira Platform: errorMessages array | ||
| if (Array.isArray(errorData.errorMessages) && errorData.errorMessages.length > 0) { | ||
| return errorData.errorMessages.join(', ') | ||
| } | ||
| // Confluence v2 / Forms API: RFC 7807 errors array | ||
| if (Array.isArray(errorData.errors) && errorData.errors.length > 0) { | ||
| const err = errorData.errors[0] | ||
| if (err?.title) { | ||
| return err.detail ? `${err.title}: ${err.detail}` : err.title | ||
| } | ||
| } | ||
| // Jira Platform field-level errors object | ||
| if (errorData.errors && !Array.isArray(errorData.errors)) { | ||
| const fieldErrors = Object.entries(errorData.errors) | ||
| .map(([field, msg]) => `${field}: ${msg}`) | ||
| .join(', ') | ||
| if (fieldErrors) return fieldErrors | ||
| } | ||
| // Generic message fallback | ||
| if (errorData.message) { |
There was a problem hiding this comment.
Non-TSDoc inline comments violate project standards
The added // comments (// JSM Service Desk: singular errorMessage, // Jira Platform: errorMessages array, etc.) are non-TSDoc comments. The project's global standards explicitly forbid non-TSDoc comments — all documentation should use TSDoc format or be removed.
Context Used: Global coding standards that apply to all files (source)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3efbd1d. Configure here.
| cost?: any | ||
| }) { | ||
| return { | ||
| model: result.model, |
There was a problem hiding this comment.
Metadata model field silently overwrites structured response data
Low Severity
Moving model into createResponseMetadata means it now gets spread over user-defined structured output in processStructuredResponse. Since metadata is spread after extractedJson, a user whose response schema includes a model field (e.g., product model, car model) will have that value silently overwritten by the provider's model identifier. Unlike the other metadata keys (tokens, toolCalls, providerTiming, cost), model is a common real-world field name, making collision more likely.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 3efbd1d. Configure here.

