@myagentroam/node 0.10.4 → 0.10.6
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.
|
@@ -27,28 +27,16 @@ export class ConversationHostingMaintenanceService {
|
|
|
27
27
|
}
|
|
28
28
|
async storageCapacity() {
|
|
29
29
|
const measuredAt = this.now();
|
|
30
|
-
const filesystem = await this.
|
|
31
|
-
assertFilesystemCapacity(filesystem);
|
|
32
|
-
const usedBytes = filesystem.totalBytes - filesystem.availableBytes;
|
|
33
|
-
const filesystemUsageBasisPoints = Number((BigInt(usedBytes) * 10000n) / BigInt(filesystem.totalBytes));
|
|
34
|
-
const capacity = filesystemUsageBasisPoints >= 9_500
|
|
35
|
-
? 'FULL'
|
|
36
|
-
: filesystemUsageBasisPoints >= 8_500
|
|
37
|
-
? 'HIGH'
|
|
38
|
-
: 'AVAILABLE';
|
|
30
|
+
const filesystem = await this.filesystemStorageCapacity();
|
|
39
31
|
return conversationHostingStorageCapacitySchema.parse({
|
|
32
|
+
...filesystem,
|
|
40
33
|
hostedStorageUsedBytes: await this.options.store.hostedStorageUsedBytes(),
|
|
41
|
-
filesystemTotalBytes: filesystem.totalBytes,
|
|
42
|
-
filesystemAvailableBytes: filesystem.availableBytes,
|
|
43
|
-
filesystemUsageBasisPoints,
|
|
44
|
-
capacity,
|
|
45
|
-
acceptsNewConversations: capacity !== 'FULL',
|
|
46
34
|
automaticCleanupInactiveDays: this.options.inactiveRetentionDays,
|
|
47
35
|
measuredAt
|
|
48
36
|
});
|
|
49
37
|
}
|
|
50
38
|
async assertCanCreate() {
|
|
51
|
-
if ((await this.
|
|
39
|
+
if (!(await this.filesystemStorageCapacity()).acceptsNewConversations)
|
|
52
40
|
throw new Error('CONVERSATION_HOSTING_STORAGE_FULL');
|
|
53
41
|
}
|
|
54
42
|
async runAutomaticCleanup() {
|
|
@@ -73,6 +61,24 @@ export class ConversationHostingMaintenanceService {
|
|
|
73
61
|
this.automaticCleanupTimer = undefined;
|
|
74
62
|
return this.pendingCleanupCount === 0 ? undefined : this.cleanupTail;
|
|
75
63
|
}
|
|
64
|
+
async filesystemStorageCapacity() {
|
|
65
|
+
const filesystem = await this.filesystemCapacity();
|
|
66
|
+
assertFilesystemCapacity(filesystem);
|
|
67
|
+
const usedBytes = filesystem.totalBytes - filesystem.availableBytes;
|
|
68
|
+
const filesystemUsageBasisPoints = Number((BigInt(usedBytes) * 10000n) / BigInt(filesystem.totalBytes));
|
|
69
|
+
const capacity = filesystemUsageBasisPoints >= 9_500
|
|
70
|
+
? 'FULL'
|
|
71
|
+
: filesystemUsageBasisPoints >= 8_500
|
|
72
|
+
? 'HIGH'
|
|
73
|
+
: 'AVAILABLE';
|
|
74
|
+
return {
|
|
75
|
+
filesystemTotalBytes: filesystem.totalBytes,
|
|
76
|
+
filesystemAvailableBytes: filesystem.availableBytes,
|
|
77
|
+
filesystemUsageBasisPoints,
|
|
78
|
+
capacity,
|
|
79
|
+
acceptsNewConversations: capacity !== 'FULL'
|
|
80
|
+
};
|
|
81
|
+
}
|
|
76
82
|
triggerAutomaticCleanup() {
|
|
77
83
|
void this.runAutomaticCleanup().catch((error) => this.options.onAutomaticCleanupError?.(error));
|
|
78
84
|
}
|
package/dist/terminal.js
CHANGED
|
@@ -317,8 +317,19 @@ export class TerminalManager {
|
|
|
317
317
|
this.detachAll(terminal);
|
|
318
318
|
const summary = this.notifySummary(terminal);
|
|
319
319
|
try {
|
|
320
|
-
if (terminal.pty !== undefined)
|
|
321
|
-
|
|
320
|
+
if (terminal.pty !== undefined) {
|
|
321
|
+
if (this.platform === 'win32') {
|
|
322
|
+
// Killing only the shell bypasses node-pty's native console cleanup.
|
|
323
|
+
try {
|
|
324
|
+
terminal.pty.kill();
|
|
325
|
+
}
|
|
326
|
+
catch {
|
|
327
|
+
await this.terminate(terminal.pty, this.platform);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
else
|
|
331
|
+
await this.terminate(terminal.pty, this.platform);
|
|
332
|
+
}
|
|
322
333
|
if (terminal.pipe !== undefined)
|
|
323
334
|
await this.terminate(terminal.pipe, this.platform);
|
|
324
335
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/node",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
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/agent": "0.10.
|
|
40
|
+
"@myagentroam/agent": "0.10.6",
|
|
41
41
|
"@myagentroam/code-navigation": "0.10.1",
|
|
42
|
-
"@myagentroam/
|
|
43
|
-
"@myagentroam/
|
|
42
|
+
"@myagentroam/protocol": "0.10.6",
|
|
43
|
+
"@myagentroam/marctl": "0.10.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/ws": "^8.18.1"
|