@adecore/agents 0.40.3 → 0.40.5
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/chat/chat-core.js
CHANGED
|
@@ -408,6 +408,7 @@ export class ChatCore {
|
|
|
408
408
|
items: session.previewItems(page.items),
|
|
409
409
|
pending: session.previewItems(session.thread.pending()),
|
|
410
410
|
subagents: session.thread.subagentsBefore(page.history.start),
|
|
411
|
+
outline: session.thread.outlineBefore(page.history.start),
|
|
411
412
|
seq: log.seq
|
|
412
413
|
};
|
|
413
414
|
}
|
|
@@ -439,6 +440,11 @@ export class ChatCore {
|
|
|
439
440
|
]);
|
|
440
441
|
} while (this.listChanges.get(chatId) !== changes);
|
|
441
442
|
const result = this.attach(chatId, clientId, historyLimit, since);
|
|
443
|
+
// A reply before the page has a tick only while a bookmark is on it, which only this read knows.
|
|
444
|
+
if (result.outline !== undefined && result.history !== undefined && bookmarks !== undefined && bookmarks.length > 0) {
|
|
445
|
+
const marked = new Set(bookmarks.map((bookmark) => bookmark.itemId));
|
|
446
|
+
result.outline = this.require(chatId).thread.outlineBefore(result.history.start, marked);
|
|
447
|
+
}
|
|
442
448
|
return { ...result, ...(bookmarks === undefined ? {} : { bookmarks }), ...(visuals === undefined ? {} : { visuals }) };
|
|
443
449
|
}
|
|
444
450
|
listChanged(chatId) {
|
package/dist/chat/thread.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare class ChatThread {
|
|
|
30
30
|
private syncRequests;
|
|
31
31
|
history(limit?: number, cursor?: string): ChatHistoryResult;
|
|
32
32
|
subagentsBefore(start: number): ChatSubagentItem[];
|
|
33
|
+
outlineBefore(start: number, marked?: ReadonlySet<string>): ChatItem[];
|
|
33
34
|
snapshot(): {
|
|
34
35
|
info: ChatInfo;
|
|
35
36
|
items: ChatItem[];
|
package/dist/chat/thread.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { activeSubagents } from '@adecore/agent-contracts';
|
|
2
|
+
import { activeSubagents, outlineItems } from '@adecore/agent-contracts';
|
|
3
3
|
import { appendToolOutput } from '@adecore/agent-contracts/text';
|
|
4
4
|
import { ChatError } from './errors.js';
|
|
5
5
|
import { requestSummaries } from './request-summary.js';
|
|
@@ -185,6 +185,10 @@ export class ChatThread {
|
|
|
185
185
|
subagentsBefore(start) {
|
|
186
186
|
return activeSubagents(this.list()).filter((item) => this.indices.get(item.id) < start);
|
|
187
187
|
}
|
|
188
|
+
/* The outline of what a page that begins at `start` leaves out, with the replies in `marked` that a bookmark is on. */
|
|
189
|
+
outlineBefore(start, marked) {
|
|
190
|
+
return outlineItems(this.order.slice(0, start).map((id) => this.items.get(id)), marked);
|
|
191
|
+
}
|
|
188
192
|
snapshot() {
|
|
189
193
|
return { info: this.info, items: this.list() };
|
|
190
194
|
}
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"models": [
|
|
105
105
|
{ "slug": "claude-fable-5-1", "name": "Claude Fable 5.1", "profile": "frontier", "aliases": ["fable"] },
|
|
106
106
|
{ "slug": "claude-opus-5-5", "name": "Claude Opus 5.5", "badge": "new", "profile": "opus", "aliases": ["opus"] },
|
|
107
|
-
{ "slug": "claude-opus-5", "name": "Claude Opus 5", "profile": "opus" },
|
|
107
|
+
{ "slug": "claude-opus-5", "name": "Claude Opus 5", "profile": "opus", "legacy": true },
|
|
108
108
|
{ "slug": "claude-sonnet-5-5", "name": "Claude Sonnet 5.5", "badge": "new", "profile": "sonnet", "aliases": ["sonnet"] },
|
|
109
|
-
{ "slug": "claude-sonnet-5", "name": "Claude Sonnet 5", "profile": "sonnet" },
|
|
109
|
+
{ "slug": "claude-sonnet-5", "name": "Claude Sonnet 5", "profile": "sonnet", "legacy": true },
|
|
110
110
|
{ "slug": "claude-haiku-5-5", "name": "Claude Haiku 5.5", "badge": "new", "profile": "sonnet", "aliases": ["haiku"] },
|
|
111
111
|
{ "slug": "claude-opus-4-6", "name": "Claude Opus 4.6", "profile": "frontier", "legacy": true },
|
|
112
112
|
{ "slug": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6", "profile": "sonnet", "legacy": true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agents",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.5",
|
|
4
4
|
"description": "Node-compatible agent chat hosts, providers, accounts, usage and durable task coordination.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"test": "bun --conditions=source test"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@adecore/agent-contracts": "0.40.
|
|
85
|
-
"@adecore/intelligent-ui": "0.40.
|
|
84
|
+
"@adecore/agent-contracts": "0.40.5",
|
|
85
|
+
"@adecore/intelligent-ui": "0.40.5",
|
|
86
86
|
"zod": "^4.6.7"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
package/src/chat/chat-core.ts
CHANGED
|
@@ -663,6 +663,7 @@ export class ChatCore {
|
|
|
663
663
|
items: session.previewItems(page.items),
|
|
664
664
|
pending: session.previewItems(session.thread.pending()),
|
|
665
665
|
subagents: session.thread.subagentsBefore(page.history.start),
|
|
666
|
+
outline: session.thread.outlineBefore(page.history.start),
|
|
666
667
|
seq: log.seq
|
|
667
668
|
};
|
|
668
669
|
}
|
|
@@ -704,6 +705,12 @@ export class ChatCore {
|
|
|
704
705
|
|
|
705
706
|
const result = this.attach(chatId, clientId, historyLimit, since);
|
|
706
707
|
|
|
708
|
+
// A reply before the page has a tick only while a bookmark is on it, which only this read knows.
|
|
709
|
+
if (result.outline !== undefined && result.history !== undefined && bookmarks !== undefined && bookmarks.length > 0) {
|
|
710
|
+
const marked = new Set(bookmarks.map((bookmark) => bookmark.itemId));
|
|
711
|
+
result.outline = this.require(chatId).thread.outlineBefore(result.history.start, marked);
|
|
712
|
+
}
|
|
713
|
+
|
|
707
714
|
return { ...result, ...(bookmarks === undefined ? {} : { bookmarks }), ...(visuals === undefined ? {} : { visuals }) };
|
|
708
715
|
}
|
|
709
716
|
|
package/src/chat/thread.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import {
|
|
3
3
|
activeSubagents,
|
|
4
|
+
outlineItems,
|
|
4
5
|
type AgentStatus,
|
|
5
6
|
type ChatApprovalItem,
|
|
6
7
|
type ChatEvent,
|
|
@@ -246,6 +247,14 @@ export class ChatThread {
|
|
|
246
247
|
return activeSubagents(this.list()).filter((item) => this.indices.get(item.id)! < start);
|
|
247
248
|
}
|
|
248
249
|
|
|
250
|
+
/* The outline of what a page that begins at `start` leaves out, with the replies in `marked` that a bookmark is on. */
|
|
251
|
+
outlineBefore(start: number, marked?: ReadonlySet<string>): ChatItem[] {
|
|
252
|
+
return outlineItems(
|
|
253
|
+
this.order.slice(0, start).map((id) => this.items.get(id)!),
|
|
254
|
+
marked
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
249
258
|
snapshot(): { info: ChatInfo; items: ChatItem[] } {
|
|
250
259
|
return { info: this.info, items: this.list() };
|
|
251
260
|
}
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"models": [
|
|
105
105
|
{ "slug": "claude-fable-5-1", "name": "Claude Fable 5.1", "profile": "frontier", "aliases": ["fable"] },
|
|
106
106
|
{ "slug": "claude-opus-5-5", "name": "Claude Opus 5.5", "badge": "new", "profile": "opus", "aliases": ["opus"] },
|
|
107
|
-
{ "slug": "claude-opus-5", "name": "Claude Opus 5", "profile": "opus" },
|
|
107
|
+
{ "slug": "claude-opus-5", "name": "Claude Opus 5", "profile": "opus", "legacy": true },
|
|
108
108
|
{ "slug": "claude-sonnet-5-5", "name": "Claude Sonnet 5.5", "badge": "new", "profile": "sonnet", "aliases": ["sonnet"] },
|
|
109
|
-
{ "slug": "claude-sonnet-5", "name": "Claude Sonnet 5", "profile": "sonnet" },
|
|
109
|
+
{ "slug": "claude-sonnet-5", "name": "Claude Sonnet 5", "profile": "sonnet", "legacy": true },
|
|
110
110
|
{ "slug": "claude-haiku-5-5", "name": "Claude Haiku 5.5", "badge": "new", "profile": "sonnet", "aliases": ["haiku"] },
|
|
111
111
|
{ "slug": "claude-opus-4-6", "name": "Claude Opus 4.6", "profile": "frontier", "legacy": true },
|
|
112
112
|
{ "slug": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6", "profile": "sonnet", "legacy": true },
|