norns-sdk 0.3.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 +14 -0
- package/README.md +0 -2
- package/dist/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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
|
+
|
|
12
|
+
## [0.4.0] - 2026-10-23
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- `mode` is no longer sent on agent registration and is deprecated on
|
|
16
|
+
`defineAgent()`. Norns never read it: a conversation starts from a
|
|
17
|
+
`conversationKey` on the message, not from the definition.
|
|
18
|
+
|
|
5
19
|
## [0.3.0] - 2026-10-22
|
|
6
20
|
|
|
7
21
|
### Added
|
package/README.md
CHANGED
|
@@ -44,7 +44,6 @@ const supportBot = defineAgent({
|
|
|
44
44
|
model: "claude-sonnet-5",
|
|
45
45
|
systemPrompt: "You are a customer support agent. Look up docs and help customers.",
|
|
46
46
|
tools: [searchDocs, sendEmail],
|
|
47
|
-
mode: "conversation",
|
|
48
47
|
});
|
|
49
48
|
|
|
50
49
|
const worker = new NornsWorker({ agents: [supportBot] });
|
|
@@ -208,7 +207,6 @@ const agent = defineAgent({
|
|
|
208
207
|
model: "claude-sonnet-5",
|
|
209
208
|
systemPrompt: "You are helpful.",
|
|
210
209
|
tools: [search, sendEmail],
|
|
211
|
-
mode: "conversation", // "task" or "conversation"
|
|
212
210
|
checkpointPolicy: "on_tool_call", // "every_step", "on_tool_call", "manual"
|
|
213
211
|
contextWindow: 20,
|
|
214
212
|
maxSteps: 50,
|
package/dist/index.cjs
CHANGED
|
@@ -75,7 +75,6 @@ function defineAgent(options) {
|
|
|
75
75
|
model: options.model ?? DEFAULT_MODEL,
|
|
76
76
|
systemPrompt: options.systemPrompt ?? "",
|
|
77
77
|
tools: Object.freeze([...tools]),
|
|
78
|
-
mode: options.mode ?? "task",
|
|
79
78
|
checkpointPolicy: options.checkpointPolicy ?? "on_tool_call",
|
|
80
79
|
contextStrategy: options.contextStrategy ?? "sliding_window",
|
|
81
80
|
contextWindow: options.contextWindow ?? 20,
|
|
@@ -90,7 +89,6 @@ function defineAgent(options) {
|
|
|
90
89
|
}
|
|
91
90
|
function agentBody(agent) {
|
|
92
91
|
const modelConfig = {
|
|
93
|
-
mode: agent.mode,
|
|
94
92
|
checkpoint_policy: agent.checkpointPolicy,
|
|
95
93
|
context_strategy: agent.contextStrategy,
|
|
96
94
|
context_window: agent.contextWindow,
|
|
@@ -395,12 +393,16 @@ var NornsClient = class {
|
|
|
395
393
|
* console.log(run.id, run.waitingFor?.question);
|
|
396
394
|
* }
|
|
397
395
|
*
|
|
398
|
-
* `status` and `agentId`
|
|
399
|
-
*
|
|
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.)
|
|
400
399
|
*/
|
|
401
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;
|
|
402
404
|
const res = await this.#request("GET", "/api/v1/runs", {
|
|
403
|
-
query
|
|
405
|
+
query
|
|
404
406
|
});
|
|
405
407
|
let runs = res.data.map(parseRun);
|
|
406
408
|
if (options.status) runs = runs.filter((r) => r.status === options.status);
|