@myagentroam/node 0.10.37 → 0.10.38
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.
|
@@ -20,6 +20,12 @@ import { MarAgentRuntimeModelFactory, sdkModelConfigurations, closeImageCredenti
|
|
|
20
20
|
import { createImageGenerationExtensions } from './image-generation-extensions.js';
|
|
21
21
|
import { createWebToolsExtensions } from './web-tools-extensions.js';
|
|
22
22
|
import { combineExecutionExtensions } from './execution-extensions.js';
|
|
23
|
+
const HOST_CONFIGURATION_CATEGORIES = [
|
|
24
|
+
'cwd',
|
|
25
|
+
'mcpServers',
|
|
26
|
+
'environment',
|
|
27
|
+
'guaranteedCommands'
|
|
28
|
+
];
|
|
23
29
|
export class MarAgentManagedRunController {
|
|
24
30
|
runner;
|
|
25
31
|
host;
|
|
@@ -592,7 +598,7 @@ export class MarAgentManagedRunController {
|
|
|
592
598
|
throw new Error('MAR_AGENT_SESSION_RUNTIME_ACTIVE');
|
|
593
599
|
if (!existing.released &&
|
|
594
600
|
existing.release === undefined &&
|
|
595
|
-
existing.fingerprint === fingerprint) {
|
|
601
|
+
existing.fingerprint.value === fingerprint.value) {
|
|
596
602
|
const configurations = compactRuntimeConfigurations(input.models, input.compact);
|
|
597
603
|
if (existing.modelFingerprint !== modelFingerprint ||
|
|
598
604
|
configurations.some((model) => model.credential?.type === 'RUNTIME_TICKET' ||
|
|
@@ -631,7 +637,7 @@ export class MarAgentManagedRunController {
|
|
|
631
637
|
});
|
|
632
638
|
return existing;
|
|
633
639
|
}
|
|
634
|
-
await this.#releaseRuntime(existing, 'host_configuration_changed');
|
|
640
|
+
await this.#releaseRuntime(existing, 'host_configuration_changed', HOST_CONFIGURATION_CATEGORIES.filter((category) => existing.fingerprint.categories[category] !== fingerprint.categories[category]));
|
|
635
641
|
}
|
|
636
642
|
const creation = this.#createRuntime(input, sessionKey, fingerprint, hostConfiguration);
|
|
637
643
|
for (const key of creationKeys)
|
|
@@ -791,7 +797,7 @@ export class MarAgentManagedRunController {
|
|
|
791
797
|
return;
|
|
792
798
|
this.#scheduleRuntimeRelease(runtime);
|
|
793
799
|
}
|
|
794
|
-
#releaseRuntime(runtime, reason) {
|
|
800
|
+
#releaseRuntime(runtime, reason, changedCategories = []) {
|
|
795
801
|
if (runtime.release !== undefined)
|
|
796
802
|
return runtime.release;
|
|
797
803
|
runtime.release = (async () => {
|
|
@@ -800,6 +806,7 @@ export class MarAgentManagedRunController {
|
|
|
800
806
|
runtimeId: runtime.runtimeId,
|
|
801
807
|
sessionId: runtime.session.id,
|
|
802
808
|
reason,
|
|
809
|
+
...(changedCategories.length === 0 ? {} : { changedCategories }),
|
|
803
810
|
...(runtime.activeRunId === undefined ? {} : { runId: runtime.activeRunId })
|
|
804
811
|
});
|
|
805
812
|
if (runtime.idleTimer !== undefined) {
|
|
@@ -977,16 +984,25 @@ function isExecutionScopedMcp(server) {
|
|
|
977
984
|
(server.transport === 'STDIO' && server.environment?.['MAR_CTL_USER_TOKEN'] !== undefined));
|
|
978
985
|
}
|
|
979
986
|
function sessionHostFingerprint(input, hostConfiguration) {
|
|
980
|
-
|
|
981
|
-
.update(canonicalJson({
|
|
987
|
+
const configuration = {
|
|
982
988
|
cwd: input.cwd,
|
|
983
989
|
mcpServers: input.mcpServers.filter((server) => !isExecutionScopedMcp(server)),
|
|
984
990
|
environment: Object.entries(hostConfiguration.environment)
|
|
985
991
|
.filter((entry) => entry[1] !== undefined)
|
|
986
992
|
.sort(([left], [right]) => left.localeCompare(right)),
|
|
987
993
|
guaranteedCommands: Object.entries(hostConfiguration.guaranteedCommands).sort(([left], [right]) => left.localeCompare(right))
|
|
988
|
-
}
|
|
989
|
-
|
|
994
|
+
};
|
|
995
|
+
const digest = (value) => createHash('sha256').update(canonicalJson(value)).digest('hex');
|
|
996
|
+
return {
|
|
997
|
+
value: digest(configuration),
|
|
998
|
+
// Only fixed category names leave this comparison; never log these value fingerprints.
|
|
999
|
+
categories: {
|
|
1000
|
+
cwd: digest(configuration.cwd),
|
|
1001
|
+
mcpServers: digest(configuration.mcpServers),
|
|
1002
|
+
environment: digest(configuration.environment),
|
|
1003
|
+
guaranteedCommands: digest(configuration.guaranteedCommands)
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
990
1006
|
}
|
|
991
1007
|
function sessionModelFingerprint(input) {
|
|
992
1008
|
const compact = marAgentRuntimeCompactConfigurationSchema.safeParse(input.compact);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.38",
|
|
4
4
|
"description": "MyAgentRoam Node runtime CLI.",
|
|
5
5
|
"license": "Apache-2.0 AND GPL-2.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"playwright": "1.62.1",
|
|
38
38
|
"ws": "^8.21.3",
|
|
39
39
|
"zod": "4.4.3",
|
|
40
|
-
"@myagentroam/
|
|
41
|
-
"@myagentroam/agent": "0.10.37",
|
|
40
|
+
"@myagentroam/agent": "0.10.38",
|
|
42
41
|
"@myagentroam/code-navigation": "0.10.1",
|
|
43
|
-
"@myagentroam/
|
|
42
|
+
"@myagentroam/marctl": "0.10.7",
|
|
43
|
+
"@myagentroam/protocol": "0.10.38"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/ws": "^8.18.1"
|