@mastra/factory 0.2.1-alpha.2 → 0.2.1-alpha.4
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/CHANGELOG.md +22 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +3462 -3583
- package/dist/factory.js.map +1 -1
- package/dist/index.js +3462 -3583
- package/dist/index.js.map +1 -1
- package/dist/integrations/base.d.ts +13 -25
- package/dist/integrations/base.d.ts.map +1 -1
- package/dist/integrations/github/integration.d.ts.map +1 -1
- package/dist/integrations/github/integration.js +625 -217
- package/dist/integrations/github/integration.js.map +1 -1
- package/dist/integrations/github/routes.d.ts +1 -4
- package/dist/integrations/github/routes.d.ts.map +1 -1
- package/dist/integrations/github/routes.js +113 -203
- package/dist/integrations/github/routes.js.map +1 -1
- package/dist/integrations/github/rules.d.ts +30 -0
- package/dist/integrations/github/rules.d.ts.map +1 -0
- package/dist/{rules/github-service.js → integrations/github/rules.js} +27 -8
- package/dist/integrations/github/rules.js.map +1 -0
- package/dist/integrations/linear/agent-tools.js.map +1 -1
- package/dist/integrations/linear/integration.d.ts.map +1 -1
- package/dist/integrations/linear/integration.js +352 -3
- package/dist/integrations/linear/integration.js.map +1 -1
- package/dist/integrations/linear/routes.d.ts +2 -2
- package/dist/integrations/linear/routes.d.ts.map +1 -1
- package/dist/integrations/linear/routes.js +2 -2
- package/dist/integrations/linear/routes.js.map +1 -1
- package/dist/integrations/linear/rules.d.ts +42 -0
- package/dist/integrations/linear/rules.d.ts.map +1 -0
- package/dist/{rules/linear-service.js → integrations/linear/rules.js} +14 -4
- package/dist/integrations/linear/rules.js.map +1 -0
- package/dist/integrations/platform/github/integration.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.js +626 -218
- package/dist/integrations/platform/github/integration.js.map +1 -1
- package/dist/integrations/platform/linear/integration.d.ts.map +1 -1
- package/dist/integrations/platform/linear/integration.js +353 -3
- package/dist/integrations/platform/linear/integration.js.map +1 -1
- package/dist/routes/oauth.js +6 -39
- package/dist/routes/oauth.js.map +1 -1
- package/dist/routes/surface.d.ts +3 -1
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +230 -619
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/work-items.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +74 -75
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/dist/storage/domains/work-items/metrics.js.map +1 -1
- package/package.json +5 -5
- package/dist/integrations/github/project-lock.d.ts +0 -100
- package/dist/integrations/github/project-lock.d.ts.map +0 -1
- package/dist/integrations/github/project-lock.js +0 -103
- package/dist/integrations/github/project-lock.js.map +0 -1
- package/dist/rules/github-service.d.ts +0 -29
- package/dist/rules/github-service.d.ts.map +0 -1
- package/dist/rules/github-service.js.map +0 -1
- package/dist/rules/linear-service.d.ts +0 -27
- package/dist/rules/linear-service.d.ts.map +0 -1
- package/dist/rules/linear-service.js.map +0 -1
package/dist/routes/oauth.js
CHANGED
|
@@ -11628,29 +11628,14 @@ var init_dist = __esm({
|
|
|
11628
11628
|
this.vectorIndexes = this.isMemoryDb ? Promise.resolve(/* @__PURE__ */ new Set()) : this.discoverVectorIndexes();
|
|
11629
11629
|
}
|
|
11630
11630
|
/**
|
|
11631
|
-
* Closes the underlying libsql client, releasing
|
|
11632
|
-
*
|
|
11633
|
-
* For local file databases, first runs PRAGMA wal_checkpoint(TRUNCATE) and
|
|
11634
|
-
* switches back to journal_mode=DELETE so the -wal and -shm sidecar files
|
|
11635
|
-
* are released promptly (mirrors LibSQLStore.close()).
|
|
11636
|
-
*
|
|
11637
|
-
* Remote (Turso) databases skip the WAL pragmas and just close the client.
|
|
11631
|
+
* Closes the underlying libsql client, releasing this vector store's OS file handles.
|
|
11638
11632
|
*
|
|
11639
11633
|
* Safe to call more than once; subsequent calls are no-ops.
|
|
11640
11634
|
*/
|
|
11641
11635
|
async close() {
|
|
11642
|
-
if (this.turso.closed) {
|
|
11643
|
-
|
|
11644
|
-
}
|
|
11645
|
-
if (this.turso.protocol === "file" && !this.isMemoryDb) {
|
|
11646
|
-
try {
|
|
11647
|
-
await this.turso.execute("PRAGMA wal_checkpoint(TRUNCATE);");
|
|
11648
|
-
await this.turso.execute("PRAGMA journal_mode=DELETE;");
|
|
11649
|
-
} catch (err) {
|
|
11650
|
-
this.logger.warn("LibSQLVector: Failed to checkpoint WAL before close.", err);
|
|
11651
|
-
}
|
|
11636
|
+
if (!this.turso.closed) {
|
|
11637
|
+
this.turso.close();
|
|
11652
11638
|
}
|
|
11653
|
-
this.turso.close();
|
|
11654
11639
|
}
|
|
11655
11640
|
async discoverVectorIndexes() {
|
|
11656
11641
|
try {
|
|
@@ -24409,32 +24394,14 @@ ${unreflectedContent}` : bufferedReflection;
|
|
|
24409
24394
|
await this.initDomainsSequentially();
|
|
24410
24395
|
}
|
|
24411
24396
|
/**
|
|
24412
|
-
* Closes the underlying libsql client, releasing
|
|
24413
|
-
*
|
|
24414
|
-
* For local file databases, first runs PRAGMA wal_checkpoint(TRUNCATE) and
|
|
24415
|
-
* switches back to journal_mode=DELETE so that Windows releases the -wal
|
|
24416
|
-
* and -shm sidecar files promptly. Without this, the handles stay open
|
|
24417
|
-
* until process exit, causing EBUSY errors when callers try to fs.rm the
|
|
24418
|
-
* storage directory after Mastra.shutdown().
|
|
24419
|
-
*
|
|
24420
|
-
* Remote (Turso) databases skip the WAL pragmas and just close the client.
|
|
24397
|
+
* Closes the underlying libsql client, releasing this store's OS file handles.
|
|
24421
24398
|
*
|
|
24422
24399
|
* Safe to call more than once; subsequent calls are no-ops.
|
|
24423
24400
|
*/
|
|
24424
24401
|
async close() {
|
|
24425
|
-
if (this.client.closed) {
|
|
24426
|
-
|
|
24427
|
-
}
|
|
24428
|
-
const isLocalFileDb = this.isLocalDb || this.client.protocol === "file";
|
|
24429
|
-
if (isLocalFileDb) {
|
|
24430
|
-
try {
|
|
24431
|
-
await this.client.execute("PRAGMA wal_checkpoint(TRUNCATE);");
|
|
24432
|
-
await this.client.execute("PRAGMA journal_mode=DELETE;");
|
|
24433
|
-
} catch (err) {
|
|
24434
|
-
this.logger.warn("LibSQLStore: Failed to checkpoint WAL before close.", err);
|
|
24435
|
-
}
|
|
24402
|
+
if (!this.client.closed) {
|
|
24403
|
+
this.client.close();
|
|
24436
24404
|
}
|
|
24437
|
-
this.client.close();
|
|
24438
24405
|
}
|
|
24439
24406
|
};
|
|
24440
24407
|
LIBSQL_PROMPT = `When querying LibSQL Vector, you can ONLY use the operators listed below. Any other operators will be rejected.
|