dexto 1.6.9 → 1.6.10
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-agents.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sync-agents.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"sync-agents.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/sync-agents.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AA0MD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAyB5D;AAoDD;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiO9F"}
|
|
@@ -65,10 +65,19 @@ async function getBundledAgentHash(agentEntry) {
|
|
|
65
65
|
/**
|
|
66
66
|
* Get hash of installed agent
|
|
67
67
|
*/
|
|
68
|
-
async function getInstalledAgentHash(agentId) {
|
|
68
|
+
async function getInstalledAgentHash(agentId, agentEntry) {
|
|
69
69
|
try {
|
|
70
70
|
const installedPath = path.join(getDextoGlobalPath('agents'), agentId);
|
|
71
71
|
const stat = await fs.stat(installedPath);
|
|
72
|
+
// Single-file bundled agents are installed inside an agent directory.
|
|
73
|
+
// Hash the installed YAML file so bundled vs installed comparisons stay symmetric.
|
|
74
|
+
if (agentEntry && !agentEntry.source.endsWith('/')) {
|
|
75
|
+
if (!stat.isDirectory()) {
|
|
76
|
+
return await hashFile(installedPath);
|
|
77
|
+
}
|
|
78
|
+
const installedFile = path.join(installedPath, path.basename(agentEntry.source));
|
|
79
|
+
return await hashFile(installedFile);
|
|
80
|
+
}
|
|
72
81
|
if (stat.isDirectory()) {
|
|
73
82
|
return await hashDirectory(installedPath);
|
|
74
83
|
}
|
|
@@ -123,7 +132,7 @@ async function getAgentStatus(agentId, agentEntry) {
|
|
|
123
132
|
}
|
|
124
133
|
try {
|
|
125
134
|
const bundledHash = await getBundledAgentHash(agentEntry);
|
|
126
|
-
const installedHash = await getInstalledAgentHash(agentId);
|
|
135
|
+
const installedHash = await getInstalledAgentHash(agentId, agentEntry);
|
|
127
136
|
if (!bundledHash || !installedHash) {
|
|
128
137
|
return {
|
|
129
138
|
id: agentId,
|
|
@@ -178,7 +187,7 @@ export async function shouldPromptForSync() {
|
|
|
178
187
|
if (!agentEntry)
|
|
179
188
|
continue;
|
|
180
189
|
const bundledHash = await getBundledAgentHash(agentEntry);
|
|
181
|
-
const installedHash = await getInstalledAgentHash(agentId);
|
|
190
|
+
const installedHash = await getInstalledAgentHash(agentId, agentEntry);
|
|
182
191
|
if (bundledHash && installedHash && bundledHash !== installedHash) {
|
|
183
192
|
return true;
|
|
184
193
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dexto",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dexto": "./dist/index.js"
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"ws": "^8.18.1",
|
|
33
33
|
"yaml": "^2.7.1",
|
|
34
34
|
"zod": "^3.25.0",
|
|
35
|
-
"@dexto/agent-config": "1.6.
|
|
36
|
-
"@dexto/agent-management": "1.6.
|
|
37
|
-
"@dexto/analytics": "1.6.
|
|
38
|
-
"@dexto/core": "1.6.
|
|
39
|
-
"@dexto/image-local": "1.6.
|
|
40
|
-
"@dexto/image-logger-agent": "1.6.
|
|
41
|
-
"@dexto/registry": "1.6.
|
|
42
|
-
"@dexto/server": "1.6.
|
|
43
|
-
"@dexto/storage": "1.6.
|
|
44
|
-
"@dexto/tui": "1.6.
|
|
35
|
+
"@dexto/agent-config": "1.6.10",
|
|
36
|
+
"@dexto/agent-management": "1.6.10",
|
|
37
|
+
"@dexto/analytics": "1.6.10",
|
|
38
|
+
"@dexto/core": "1.6.10",
|
|
39
|
+
"@dexto/image-local": "1.6.10",
|
|
40
|
+
"@dexto/image-logger-agent": "1.6.10",
|
|
41
|
+
"@dexto/registry": "1.6.10",
|
|
42
|
+
"@dexto/server": "1.6.10",
|
|
43
|
+
"@dexto/storage": "1.6.10",
|
|
44
|
+
"@dexto/tui": "1.6.10"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/ws": "^8.5.11",
|