@salesforce/sfdx-agent-harness-mastra 0.9.0 → 0.10.0
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/mastra-harness.js +19 -0
- package/package.json +4 -4
package/dist/mastra-harness.js
CHANGED
|
@@ -417,6 +417,25 @@ export class MastraHarness {
|
|
|
417
417
|
// Settle the constructor's eager init before closing — see the
|
|
418
418
|
// `storageReady` field comment for the why.
|
|
419
419
|
await this.storageReady;
|
|
420
|
+
// Fold the WAL into the main DB and switch journal_mode=DELETE
|
|
421
|
+
// so SQLite unlinks the -wal/-shm sidecars on close. Without this,
|
|
422
|
+
// Windows holds the sidecars open well past `client.close()` and
|
|
423
|
+
// racing `fs.rm` calls (e.g. vitest's per-test cleanup) crash the
|
|
424
|
+
// worker. Mirrors the fix Mastra shipped on `LibSQLStore.close()`
|
|
425
|
+
// in `@mastra/libsql@1.12.0-alpha.0`. Replace this block with a
|
|
426
|
+
// call to `storage.close()` once that release ships stable — see
|
|
427
|
+
// https://github.com/forcedotcom/agentic-dx/issues/475.
|
|
428
|
+
try {
|
|
429
|
+
await this.libsqlClient.execute('PRAGMA wal_checkpoint(TRUNCATE);');
|
|
430
|
+
await this.libsqlClient.execute('PRAGMA journal_mode=DELETE;');
|
|
431
|
+
}
|
|
432
|
+
catch (err) {
|
|
433
|
+
// Best-effort: still close even if checkpoint fails (e.g. the
|
|
434
|
+
// client was already closed by a prior shutdown path).
|
|
435
|
+
this.buses.getLogBus()?.warn('libsql WAL checkpoint failed before close', {
|
|
436
|
+
error: getErrorMessage(err),
|
|
437
|
+
});
|
|
438
|
+
}
|
|
420
439
|
this.libsqlClient.close();
|
|
421
440
|
this.buses.dispose();
|
|
422
441
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/sfdx-agent-harness-mastra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Mastra-backed AgentHarness implementation for @salesforce/sfdx-agent-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"@mastra/memory": "^1.19.0",
|
|
36
36
|
"@mastra/schema-compat": "^1.2.10",
|
|
37
37
|
"@salesforce/agentic-common": "0.6.0",
|
|
38
|
-
"@salesforce/llm-gateway-sdk": "0.
|
|
38
|
+
"@salesforce/llm-gateway-sdk": "0.8.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@salesforce/sfdx-agent-sdk": "0.
|
|
41
|
+
"@salesforce/sfdx-agent-sdk": "0.11.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@eslint/js": "^10.0.1",
|
|
45
|
-
"@salesforce/sfdx-agent-sdk": "0.
|
|
45
|
+
"@salesforce/sfdx-agent-sdk": "0.11.0",
|
|
46
46
|
"@types/node": "^22.19.17",
|
|
47
47
|
"@vitest/coverage-istanbul": "^4.1.7",
|
|
48
48
|
"@vitest/eslint-plugin": "^1.6.17",
|