@mastra/factory 0.27.0-alpha.0 → 0.27.0-alpha.1
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/integrations/incidentio/default-rules.d.ts +0 -1
- package/dist/integrations/incidentio/default-rules.d.ts.map +1 -1
- package/dist/integrations/incidentio/default-rules.js +0 -2
- package/dist/integrations/incidentio/default-rules.js.map +1 -1
- package/dist/integrations/incidentio/rules.d.ts.map +1 -1
- package/dist/integrations/incidentio/rules.js +2 -27
- package/dist/integrations/incidentio/rules.js.map +1 -1
- package/dist/integrations/jira/default-rules.d.ts +0 -1
- package/dist/integrations/jira/default-rules.d.ts.map +1 -1
- package/dist/integrations/jira/default-rules.js +0 -2
- package/dist/integrations/jira/default-rules.js.map +1 -1
- package/dist/integrations/jira/routes.d.ts +1 -1
- package/dist/integrations/jira/routes.d.ts.map +1 -1
- package/dist/integrations/jira/routes.js +6 -3
- package/dist/integrations/jira/routes.js.map +1 -1
- package/dist/integrations/jira/rules.d.ts.map +1 -1
- package/dist/integrations/jira/rules.js +2 -22
- package/dist/integrations/jira/rules.js.map +1 -1
- package/dist/integrations/linear/default-rules.d.ts +0 -1
- package/dist/integrations/linear/default-rules.d.ts.map +1 -1
- package/dist/integrations/linear/default-rules.js +0 -2
- package/dist/integrations/linear/default-rules.js.map +1 -1
- package/dist/integrations/linear/routes.d.ts +1 -1
- package/dist/integrations/linear/routes.d.ts.map +1 -1
- package/dist/integrations/linear/routes.js +13 -15
- package/dist/integrations/linear/routes.js.map +1 -1
- package/dist/integrations/linear/rules.d.ts.map +1 -1
- package/dist/integrations/linear/rules.js +2 -23
- package/dist/integrations/linear/rules.js.map +1 -1
- package/dist/integrations/platform/jira/routes.d.ts +1 -1
- package/dist/integrations/platform/jira/routes.d.ts.map +1 -1
- package/dist/integrations/platform/jira/routes.js +6 -3
- package/dist/integrations/platform/jira/routes.js.map +1 -1
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +24 -45
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/rules/processor.d.ts.map +1 -1
- package/dist/rules/processor.js +1 -0
- package/dist/rules/processor.js.map +1 -1
- package/dist/rules/types.d.ts +0 -7
- package/dist/rules/types.d.ts.map +1 -1
- package/dist/rules/types.js.map +1 -1
- package/dist/rules/validation.d.ts.map +1 -1
- package/dist/rules/validation.js +0 -2
- package/dist/rules/validation.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +0 -34
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +10 -139
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/package.json +7 -7
- package/dist/integrations/incidentio/claim.d.ts +0 -8
- package/dist/integrations/incidentio/claim.d.ts.map +0 -1
- package/dist/integrations/incidentio/claim.js +0 -13
- package/dist/integrations/incidentio/claim.js.map +0 -1
- package/dist/integrations/jira/claim.d.ts +0 -21
- package/dist/integrations/jira/claim.d.ts.map +0 -1
- package/dist/integrations/jira/claim.js +0 -37
- package/dist/integrations/jira/claim.js.map +0 -1
- package/dist/integrations/linear/claim.d.ts +0 -8
- package/dist/integrations/linear/claim.d.ts.map +0 -1
- package/dist/integrations/linear/claim.js +0 -13
- package/dist/integrations/linear/claim.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/factory",
|
|
3
|
-
"version": "0.27.0-alpha.
|
|
3
|
+
"version": "0.27.0-alpha.1",
|
|
4
4
|
"description": "Mastra Software Factory module: the server core behind the Mastra Software Factory — storage domains, integrations, and surfaces for agent-powered software delivery",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"zod": "^4.6.7",
|
|
61
61
|
"@mastra/auth-studio": "1.3.11",
|
|
62
62
|
"@mastra/auth-workos": "1.6.8",
|
|
63
|
-
"@mastra/code-sdk": "1.18.0-alpha.
|
|
64
|
-
"@mastra/core": "1.82.0-alpha.
|
|
63
|
+
"@mastra/code-sdk": "1.18.0-alpha.1",
|
|
64
|
+
"@mastra/core": "1.82.0-alpha.1",
|
|
65
65
|
"@mastra/mcp": "2.8.0-alpha.0",
|
|
66
|
-
"@mastra/platform-workspace": "1.11.0",
|
|
66
|
+
"@mastra/platform-workspace": "1.11.1-alpha.0",
|
|
67
67
|
"@mastra/slack": "1.8.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"@internal/lint": "0.0.147",
|
|
76
76
|
"@internal/types-builder": "0.0.122",
|
|
77
77
|
"@internal/workspace": "0.0.19",
|
|
78
|
-
"@mastra/deployer": "1.82.0-alpha.
|
|
78
|
+
"@mastra/deployer": "1.82.0-alpha.1",
|
|
79
79
|
"@mastra/libsql": "1.29.0-alpha.0",
|
|
80
|
-
"@mastra/pg": "1.35.0-alpha.
|
|
81
|
-
"@mastra/server": "1.82.0-alpha.
|
|
80
|
+
"@mastra/pg": "1.35.0-alpha.1",
|
|
81
|
+
"@mastra/server": "1.82.0-alpha.1"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=22.19.0"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Org-wide ownership key for an incident.io follow-up's Factory card. Keyed by
|
|
3
|
-
* the prefixed item reference the intake feed serves as `id`
|
|
4
|
-
* (`incidentio:follow-up:<ulid>`), which is globally unique across accounts,
|
|
5
|
-
* so a single live card holds the claim org-wide.
|
|
6
|
-
*/
|
|
7
|
-
export declare function incidentioClaimKey(itemRef: string): string;
|
|
8
|
-
//# sourceMappingURL=claim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../../src/integrations/incidentio/claim.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// src/integrations/incidentio/claim.ts
|
|
2
|
-
/**
|
|
3
|
-
* Org-wide ownership key for an incident.io follow-up's Factory card. Keyed by
|
|
4
|
-
* the prefixed item reference the intake feed serves as `id`
|
|
5
|
-
* (`incidentio:follow-up:<ulid>`), which is globally unique across accounts,
|
|
6
|
-
* so a single live card holds the claim org-wide.
|
|
7
|
-
*/
|
|
8
|
-
function incidentioClaimKey(itemRef) {
|
|
9
|
-
return `incidentio:item:${itemRef}`;
|
|
10
|
-
}
|
|
11
|
-
export { incidentioClaimKey };
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=claim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claim.js","names":[],"sources":["../../../src/integrations/incidentio/claim.ts"],"sourcesContent":["/**\n * Org-wide ownership key for an incident.io follow-up's Factory card. Keyed by\n * the prefixed item reference the intake feed serves as `id`\n * (`incidentio:follow-up:<ulid>`), which is globally unique across accounts,\n * so a single live card holds the claim org-wide.\n */\nexport function incidentioClaimKey(itemRef: string): string {\n return `incidentio:item:${itemRef}`;\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,mBAAmB,SAAyB;CAC1D,OAAO,mBAAmB;AAC5B"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { WorkItemRow, WorkItemsStorage } from '../../storage/domains/work-items/base.js';
|
|
2
|
-
/**
|
|
3
|
-
* Org-wide ownership key for a Jira issue's Factory card. Keyed by the issue
|
|
4
|
-
* reference the intake feed serves as `id` — the direct integration's stable
|
|
5
|
-
* Jira issue id, or the Platform-encoded issue reference (connection + key +
|
|
6
|
-
* project). Either way one key names one issue across every Factory project,
|
|
7
|
-
* so a single live card holds the claim org-wide.
|
|
8
|
-
*/
|
|
9
|
-
export declare function jiraClaimKey(issueRef: string): string;
|
|
10
|
-
/** Every card the org holds for one Jira issue: its claimant, plus cards filed before claims existed. */
|
|
11
|
-
export declare function jiraIssueCards(workItems: Pick<WorkItemsStorage, 'getByClaimKey' | 'listBySource'>, { orgId, issueRef }: {
|
|
12
|
-
orgId: string;
|
|
13
|
-
issueRef: string;
|
|
14
|
-
}): Promise<WorkItemRow[]>;
|
|
15
|
-
/** Whether `factoryProjectId` holds a card for the issue, live or finished. Without card storage nothing is filed. */
|
|
16
|
-
export declare function jiraIssueFiledIn(workItems: Pick<WorkItemsStorage, 'getByClaimKey' | 'listBySource'> | undefined, { orgId, factoryProjectId, issueRef }: {
|
|
17
|
-
orgId: string;
|
|
18
|
-
factoryProjectId: string;
|
|
19
|
-
issueRef: string;
|
|
20
|
-
}): Promise<boolean>;
|
|
21
|
-
//# sourceMappingURL=claim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../../src/integrations/jira/claim.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE9F;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,yGAAyG;AACzG,wBAAsB,cAAc,CAClC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,eAAe,GAAG,cAAc,CAAC,EACnE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACvD,OAAO,CAAC,WAAW,EAAE,CAAC,CAMxB;AAED,sHAAsH;AACtH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,eAAe,GAAG,cAAc,CAAC,GAAG,SAAS,EAC/E,EAAE,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACnG,OAAO,CAAC,OAAO,CAAC,CAIlB"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// src/integrations/jira/claim.ts
|
|
2
|
-
/**
|
|
3
|
-
* Org-wide ownership key for a Jira issue's Factory card. Keyed by the issue
|
|
4
|
-
* reference the intake feed serves as `id` — the direct integration's stable
|
|
5
|
-
* Jira issue id, or the Platform-encoded issue reference (connection + key +
|
|
6
|
-
* project). Either way one key names one issue across every Factory project,
|
|
7
|
-
* so a single live card holds the claim org-wide.
|
|
8
|
-
*/
|
|
9
|
-
function jiraClaimKey(issueRef) {
|
|
10
|
-
return `jira:issue:${issueRef}`;
|
|
11
|
-
}
|
|
12
|
-
/** Every card the org holds for one Jira issue: its claimant, plus cards filed before claims existed. */
|
|
13
|
-
async function jiraIssueCards(workItems, { orgId, issueRef }) {
|
|
14
|
-
const [claimant, legacy] = await Promise.all([workItems.getByClaimKey({
|
|
15
|
-
orgId,
|
|
16
|
-
claimKey: jiraClaimKey(issueRef)
|
|
17
|
-
}), workItems.listBySource({
|
|
18
|
-
orgId,
|
|
19
|
-
source: {
|
|
20
|
-
integrationId: "jira",
|
|
21
|
-
type: "issue",
|
|
22
|
-
externalId: issueRef
|
|
23
|
-
}
|
|
24
|
-
})]);
|
|
25
|
-
return claimant ? [claimant, ...legacy] : legacy;
|
|
26
|
-
}
|
|
27
|
-
/** Whether `factoryProjectId` holds a card for the issue, live or finished. Without card storage nothing is filed. */
|
|
28
|
-
async function jiraIssueFiledIn(workItems, { orgId, factoryProjectId, issueRef }) {
|
|
29
|
-
if (!workItems) return false;
|
|
30
|
-
return (await jiraIssueCards(workItems, {
|
|
31
|
-
orgId,
|
|
32
|
-
issueRef
|
|
33
|
-
})).some((card) => card.factoryProjectId === factoryProjectId);
|
|
34
|
-
}
|
|
35
|
-
export { jiraClaimKey, jiraIssueCards, jiraIssueFiledIn };
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=claim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claim.js","names":[],"sources":["../../../src/integrations/jira/claim.ts"],"sourcesContent":["import type { WorkItemRow, WorkItemsStorage } from '../../storage/domains/work-items/base.js';\n\n/**\n * Org-wide ownership key for a Jira issue's Factory card. Keyed by the issue\n * reference the intake feed serves as `id` — the direct integration's stable\n * Jira issue id, or the Platform-encoded issue reference (connection + key +\n * project). Either way one key names one issue across every Factory project,\n * so a single live card holds the claim org-wide.\n */\nexport function jiraClaimKey(issueRef: string): string {\n return `jira:issue:${issueRef}`;\n}\n\n/** Every card the org holds for one Jira issue: its claimant, plus cards filed before claims existed. */\nexport async function jiraIssueCards(\n workItems: Pick<WorkItemsStorage, 'getByClaimKey' | 'listBySource'>,\n { orgId, issueRef }: { orgId: string; issueRef: string },\n): Promise<WorkItemRow[]> {\n const [claimant, legacy] = await Promise.all([\n workItems.getByClaimKey({ orgId, claimKey: jiraClaimKey(issueRef) }),\n workItems.listBySource({ orgId, source: { integrationId: 'jira', type: 'issue', externalId: issueRef } }),\n ]);\n return claimant ? [claimant, ...legacy] : legacy;\n}\n\n/** Whether `factoryProjectId` holds a card for the issue, live or finished. Without card storage nothing is filed. */\nexport async function jiraIssueFiledIn(\n workItems: Pick<WorkItemsStorage, 'getByClaimKey' | 'listBySource'> | undefined,\n { orgId, factoryProjectId, issueRef }: { orgId: string; factoryProjectId: string; issueRef: string },\n): Promise<boolean> {\n if (!workItems) return false;\n const cards = await jiraIssueCards(workItems, { orgId, issueRef });\n return cards.some(card => card.factoryProjectId === factoryProjectId);\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,aAAa,UAA0B;CACrD,OAAO,cAAc;AACvB;;AAGA,eAAsB,eACpB,WACA,EAAE,OAAO,YACe;CACxB,MAAM,CAAC,UAAU,UAAU,MAAM,QAAQ,IAAI,CAC3C,UAAU,cAAc;EAAE;EAAO,UAAU,aAAa,QAAQ;CAAE,CAAC,GACnE,UAAU,aAAa;EAAE;EAAO,QAAQ;GAAE,eAAe;GAAQ,MAAM;GAAS,YAAY;EAAS;CAAE,CAAC,CAC1G,CAAC;CACD,OAAO,WAAW,CAAC,UAAU,GAAG,MAAM,IAAI;AAC5C;;AAGA,eAAsB,iBACpB,WACA,EAAE,OAAO,kBAAkB,YACT;CAClB,IAAI,CAAC,WAAW,OAAO;CAEvB,QAAO,MADa,eAAe,WAAW;EAAE;EAAO;CAAS,CAAC,EAAA,CACpD,MAAK,SAAQ,KAAK,qBAAqB,gBAAgB;AACtE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Org-wide ownership key for a Linear issue's Factory card. Keyed by the issue's
|
|
3
|
-
* stable UUID, never its human identifier: identifiers change when an issue
|
|
4
|
-
* moves between teams, and the UUID is unique across every Linear workspace, so
|
|
5
|
-
* one key names one issue no matter which workspace or source it was read from.
|
|
6
|
-
*/
|
|
7
|
-
export declare function linearClaimKey(issueId: string): string;
|
|
8
|
-
//# sourceMappingURL=claim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../../src/integrations/linear/claim.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// src/integrations/linear/claim.ts
|
|
2
|
-
/**
|
|
3
|
-
* Org-wide ownership key for a Linear issue's Factory card. Keyed by the issue's
|
|
4
|
-
* stable UUID, never its human identifier: identifiers change when an issue
|
|
5
|
-
* moves between teams, and the UUID is unique across every Linear workspace, so
|
|
6
|
-
* one key names one issue no matter which workspace or source it was read from.
|
|
7
|
-
*/
|
|
8
|
-
function linearClaimKey(issueId) {
|
|
9
|
-
return `linear:issue:${issueId}`;
|
|
10
|
-
}
|
|
11
|
-
export { linearClaimKey };
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=claim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claim.js","names":[],"sources":["../../../src/integrations/linear/claim.ts"],"sourcesContent":["/**\n * Org-wide ownership key for a Linear issue's Factory card. Keyed by the issue's\n * stable UUID, never its human identifier: identifiers change when an issue\n * moves between teams, and the UUID is unique across every Linear workspace, so\n * one key names one issue no matter which workspace or source it was read from.\n */\nexport function linearClaimKey(issueId: string): string {\n return `linear:issue:${issueId}`;\n}\n"],"mappings":";;;;;;;AAMA,SAAgB,eAAe,SAAyB;CACtD,OAAO,gBAAgB;AACzB"}
|