runline 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugins/jira/src/index.js +28 -11
- package/package.json +2 -2
|
@@ -157,31 +157,48 @@ export default function jira(rl) {
|
|
|
157
157
|
},
|
|
158
158
|
});
|
|
159
159
|
rl.registerAction("issue.search", {
|
|
160
|
-
description: "Search issues using JQL",
|
|
160
|
+
description: "Search issues using JQL (uses /rest/api/3/search/jql; pagination is cursor-based via nextPageToken)",
|
|
161
161
|
inputSchema: {
|
|
162
162
|
jql: { type: "string", required: true, description: "JQL query" },
|
|
163
163
|
fields: {
|
|
164
164
|
type: "array",
|
|
165
165
|
required: false,
|
|
166
|
-
description: "Fields to return",
|
|
166
|
+
description: "Fields to return (e.g. ['summary','status']). Defaults to ['*all'] to match the legacy /search behavior.",
|
|
167
167
|
},
|
|
168
168
|
maxResults: {
|
|
169
169
|
type: "number",
|
|
170
170
|
required: false,
|
|
171
|
-
description: "Max results",
|
|
171
|
+
description: "Max results per page (server caps at 100)",
|
|
172
|
+
},
|
|
173
|
+
nextPageToken: {
|
|
174
|
+
type: "string",
|
|
175
|
+
required: false,
|
|
176
|
+
description: "Cursor returned by the previous response. Pass to fetch the next page.",
|
|
177
|
+
},
|
|
178
|
+
expand: {
|
|
179
|
+
type: "string",
|
|
180
|
+
required: false,
|
|
181
|
+
description: "Comma-separated expansions",
|
|
172
182
|
},
|
|
173
|
-
startAt: { type: "number", required: false, description: "Start index" },
|
|
174
183
|
},
|
|
175
184
|
async execute(input, ctx) {
|
|
176
|
-
const { jql, fields, maxResults,
|
|
177
|
-
const body = {
|
|
178
|
-
|
|
179
|
-
|
|
185
|
+
const { jql, fields, maxResults, nextPageToken, expand } = input;
|
|
186
|
+
const body = {
|
|
187
|
+
jql,
|
|
188
|
+
// The new endpoint returns only id+key by default; preserve the old
|
|
189
|
+
// "all navigable fields" behavior unless the caller specifies.
|
|
190
|
+
fields: Array.isArray(fields) ? fields : ["*all"],
|
|
191
|
+
};
|
|
180
192
|
if (maxResults)
|
|
181
193
|
body.maxResults = maxResults;
|
|
182
|
-
if (
|
|
183
|
-
body.
|
|
184
|
-
|
|
194
|
+
if (nextPageToken)
|
|
195
|
+
body.nextPageToken = nextPageToken;
|
|
196
|
+
if (expand)
|
|
197
|
+
body.expand = expand;
|
|
198
|
+
// Atlassian removed POST /rest/api/2|3/search (CHANGE-2046).
|
|
199
|
+
// The replacement endpoint is POST /rest/api/3/search/jql with
|
|
200
|
+
// cursor-based pagination.
|
|
201
|
+
return jr(ctx, "POST", "/api/3/search/jql", body);
|
|
185
202
|
},
|
|
186
203
|
});
|
|
187
204
|
rl.registerAction("issue.update", {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runline",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "Code mode for agents
|
|
3
|
+
"version": "0.5.2",
|
|
4
|
+
"description": "Code mode for agents \u2014 turn any API or command into a callable action",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"exports": {
|