norns-sdk 0.4.0 → 0.4.1
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/CHANGELOG.md +7 -0
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `norns-sdk` are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.4.1] - 2026-10-23
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- `runs.list()` sends `status` and `agentId` to the server, which filters
|
|
9
|
+
before applying `limit` (Norns ≥ the `GET /runs` filter change). The page
|
|
10
|
+
is still filtered locally for older servers.
|
|
11
|
+
|
|
5
12
|
## [0.4.0] - 2026-10-23
|
|
6
13
|
|
|
7
14
|
### Changed
|
package/dist/index.cjs
CHANGED
|
@@ -393,12 +393,16 @@ var NornsClient = class {
|
|
|
393
393
|
* console.log(run.id, run.waitingFor?.question);
|
|
394
394
|
* }
|
|
395
395
|
*
|
|
396
|
-
* `status` and `agentId`
|
|
397
|
-
*
|
|
396
|
+
* `status` and `agentId` are sent to the server, which filters before
|
|
397
|
+
* applying `limit`. (A Norns older than the filters ignores them, so
|
|
398
|
+
* the page is filtered here as well.)
|
|
398
399
|
*/
|
|
399
400
|
list: async (options = {}) => {
|
|
401
|
+
const query = { limit: options.limit ?? 50 };
|
|
402
|
+
if (options.status) query.status = options.status;
|
|
403
|
+
if (options.agentId !== void 0) query.agent_id = options.agentId;
|
|
400
404
|
const res = await this.#request("GET", "/api/v1/runs", {
|
|
401
|
-
query
|
|
405
|
+
query
|
|
402
406
|
});
|
|
403
407
|
let runs = res.data.map(parseRun);
|
|
404
408
|
if (options.status) runs = runs.filter((r) => r.status === options.status);
|