@myagentroam/node 0.11.59 → 0.11.60
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.
|
@@ -11,6 +11,7 @@ import { captureMarAgentExecutionInput, marAgentEnvelopeInput } from './mar-agen
|
|
|
11
11
|
export class MarAgentRunner extends AbstractRunner {
|
|
12
12
|
homeDirectory;
|
|
13
13
|
name = 'mar-agent';
|
|
14
|
+
#contextCatalog;
|
|
14
15
|
prepareMessageInput(input, collaborationMode) {
|
|
15
16
|
const prepared = super.prepareMessageInput(input, collaborationMode);
|
|
16
17
|
return parseComposerTags(prepared)
|
|
@@ -582,9 +583,12 @@ export class MarAgentRunner extends AbstractRunner {
|
|
|
582
583
|
const model = this.#models.find((candidate) => candidate.id === session.modelId);
|
|
583
584
|
if (model === undefined)
|
|
584
585
|
return undefined;
|
|
586
|
+
const pending = (this.#contextCatalog ??= openAgentSessionCatalog({
|
|
587
|
+
homeDirectory: this.homeDirectory
|
|
588
|
+
}));
|
|
585
589
|
let catalog;
|
|
586
590
|
try {
|
|
587
|
-
catalog = await
|
|
591
|
+
catalog = await pending;
|
|
588
592
|
const usage = await catalog.contextUsage(session.externalSessionId);
|
|
589
593
|
return usage === undefined
|
|
590
594
|
? undefined
|
|
@@ -599,13 +603,17 @@ export class MarAgentRunner extends AbstractRunner {
|
|
|
599
603
|
};
|
|
600
604
|
}
|
|
601
605
|
catch {
|
|
606
|
+
if (catalog === undefined && this.#contextCatalog === pending)
|
|
607
|
+
this.#contextCatalog = undefined;
|
|
602
608
|
return undefined;
|
|
603
609
|
}
|
|
604
|
-
finally {
|
|
605
|
-
await catalog?.close().catch(() => undefined);
|
|
606
|
-
}
|
|
607
610
|
}
|
|
608
|
-
stop() {
|
|
611
|
+
async stop() {
|
|
612
|
+
const pending = this.#contextCatalog;
|
|
613
|
+
this.#contextCatalog = undefined;
|
|
614
|
+
const catalog = await pending?.catch(() => undefined);
|
|
615
|
+
await catalog?.close();
|
|
616
|
+
}
|
|
609
617
|
async #readInputImage(sessionId, sequence, imageIndex, expected) {
|
|
610
618
|
let catalog;
|
|
611
619
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.60",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0 AND GPL-2.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"sharp": "0.35.5",
|
|
39
39
|
"ws": "^8.21.3",
|
|
40
40
|
"zod": "4.4.3",
|
|
41
|
-
"@myagentroam/
|
|
41
|
+
"@myagentroam/protocol": "0.11.60",
|
|
42
42
|
"@myagentroam/code-navigation": "0.11.1",
|
|
43
|
-
"@myagentroam/
|
|
44
|
-
"@myagentroam/
|
|
43
|
+
"@myagentroam/agent": "0.11.60",
|
|
44
|
+
"@myagentroam/marctl": "0.11.11"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/ws": "^8.18.1"
|