runline 0.5.0 → 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/core/engine.js +8 -10
- package/dist/plugins/jira/src/index.js +28 -11
- package/package.json +5 -4
- package/vendor/README.md +19 -0
- package/vendor/minisearch.umd.js +2013 -0
package/dist/core/engine.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
2
|
import { getQuickJS, shouldInterruptAfterDeadline, } from "quickjs-emscripten";
|
|
4
3
|
import { applyEnvOverrides, updateConnectionConfig } from "../config/loader.js";
|
|
5
4
|
export class ExecutionEngine {
|
|
@@ -217,15 +216,14 @@ function formatError(cause) {
|
|
|
217
216
|
}
|
|
218
217
|
return String(cause);
|
|
219
218
|
}
|
|
220
|
-
// MiniSearch UMD bundle,
|
|
221
|
-
// UMD
|
|
222
|
-
// (
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
})();
|
|
219
|
+
// MiniSearch UMD bundle, vendored at the package root and inlined into the
|
|
220
|
+
// sandbox source. UMD attaches `MiniSearch` to globalThis in a non-CJS /
|
|
221
|
+
// non-AMD env (QuickJS), so pasting the file is enough.
|
|
222
|
+
//
|
|
223
|
+
// `../../vendor/...` resolves identically from src/core/engine.ts (dev) and
|
|
224
|
+
// dist/core/engine.js (published) because tsc preserves the `core/` subdir.
|
|
225
|
+
// See vendor/README.md for the upgrade procedure.
|
|
226
|
+
const __minisearchSource = readFileSync(new URL("../../vendor/minisearch.umd.js", import.meta.url), "utf8");
|
|
229
227
|
function buildHelpData(plugins) {
|
|
230
228
|
const data = {};
|
|
231
229
|
for (const p of plugins) {
|
|
@@ -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": {
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"runline": "./dist/main.js"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"dist"
|
|
28
|
+
"dist",
|
|
29
|
+
"vendor"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
31
32
|
"build": "tsc && bun --filter runline-plugins build && rm -rf dist/plugins && cp -R ../runline-plugins/dist dist/plugins",
|
|
@@ -58,12 +59,12 @@
|
|
|
58
59
|
"@types/bun": "^1.2.17",
|
|
59
60
|
"@types/node": "^25.5.0",
|
|
60
61
|
"@types/proper-lockfile": "^4.1.4",
|
|
62
|
+
"minisearch": "^7.2.0",
|
|
61
63
|
"typescript": "^5.8.0"
|
|
62
64
|
},
|
|
63
65
|
"dependencies": {
|
|
64
66
|
"chalk": "^5.6.2",
|
|
65
67
|
"commander": "^14.0.3",
|
|
66
|
-
"minisearch": "^7.2.0",
|
|
67
68
|
"proper-lockfile": "^4.1.2",
|
|
68
69
|
"quickjs-emscripten": "^0.32.0",
|
|
69
70
|
"rrule": "^2.8.1"
|
package/vendor/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# vendor
|
|
2
|
+
|
|
3
|
+
Third-party bundles inlined into the QuickJS sandbox at runtime.
|
|
4
|
+
|
|
5
|
+
These files are committed deliberately: the sandbox eval'd source is part of runline's behavior, and PR diffs should show exactly what changes when a bundle is bumped.
|
|
6
|
+
|
|
7
|
+
## minisearch.umd.js
|
|
8
|
+
|
|
9
|
+
UMD build of [minisearch](https://github.com/lucaong/minisearch). Read by `src/core/engine.ts` and inlined into the sandbox so `MiniSearch` is available as a global to agent code (powers `actions.find()`).
|
|
10
|
+
|
|
11
|
+
To upgrade:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm i -D minisearch@latest
|
|
15
|
+
cp node_modules/minisearch/dist/umd/index.js vendor/minisearch.umd.js
|
|
16
|
+
git commit -am "vendor: bump minisearch"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The `minisearch` devDependency exists only as a convenience for that `cp` — nothing imports it at runtime.
|