@mastra/factory 0.29.0-alpha.0 → 0.29.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/README.md +20 -4
- package/dist/board-changes.d.ts +16 -0
- package/dist/board-changes.d.ts.map +1 -0
- package/dist/board-changes.js +40 -0
- package/dist/board-changes.js.map +1 -0
- package/dist/boards/index.js +2 -1
- package/dist/boards/semantics.d.ts +1 -3
- package/dist/boards/semantics.d.ts.map +1 -1
- package/dist/boards/semantics.js +1 -5
- package/dist/boards/semantics.js.map +1 -1
- package/dist/factory.d.ts +4 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +51 -3
- package/dist/factory.js.map +1 -1
- package/dist/integrations/base.d.ts +9 -0
- package/dist/integrations/base.d.ts.map +1 -1
- package/dist/integrations/github/pull-request-source.js +2 -1
- package/dist/integrations/github/pull-request-source.js.map +1 -1
- package/dist/integrations/github/reconcile-worker.js +1 -1
- package/dist/integrations/github/reconcile-worker.js.map +1 -1
- package/dist/integrations/github/rules.d.ts +5 -2
- package/dist/integrations/github/rules.d.ts.map +1 -1
- package/dist/integrations/github/rules.js +16 -13
- package/dist/integrations/github/rules.js.map +1 -1
- package/dist/integrations/github/sandbox.js +2 -2
- package/dist/integrations/github/sandbox.js.map +1 -1
- package/dist/integrations/gitlab/default-rules.js +2 -1
- package/dist/integrations/gitlab/default-rules.js.map +1 -1
- package/dist/integrations/gitlab/discovery.d.ts +16 -0
- package/dist/integrations/gitlab/discovery.d.ts.map +1 -0
- package/dist/integrations/gitlab/discovery.js +107 -0
- package/dist/integrations/gitlab/discovery.js.map +1 -0
- package/dist/integrations/gitlab/integration.d.ts.map +1 -1
- package/dist/integrations/gitlab/integration.js +1 -2
- package/dist/integrations/gitlab/integration.js.map +1 -1
- package/dist/integrations/gitlab/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/gitlab/issue-reconciler.js +1 -0
- package/dist/integrations/gitlab/issue-reconciler.js.map +1 -1
- package/dist/integrations/gitlab/merge-request-reconciler.d.ts.map +1 -1
- package/dist/integrations/gitlab/merge-request-reconciler.js +26 -10
- package/dist/integrations/gitlab/merge-request-reconciler.js.map +1 -1
- package/dist/integrations/gitlab/reconciler.d.ts.map +1 -1
- package/dist/integrations/gitlab/reconciler.js +4 -2
- package/dist/integrations/gitlab/reconciler.js.map +1 -1
- package/dist/integrations/gitlab/reconciliation-config.d.ts +0 -1
- package/dist/integrations/gitlab/reconciliation-config.d.ts.map +1 -1
- package/dist/integrations/gitlab/reconciliation-config.js +2 -8
- package/dist/integrations/gitlab/reconciliation-config.js.map +1 -1
- package/dist/integrations/gitlab/routes.d.ts +17 -0
- package/dist/integrations/gitlab/routes.d.ts.map +1 -1
- package/dist/integrations/gitlab/routes.js +28 -22
- package/dist/integrations/gitlab/routes.js.map +1 -1
- package/dist/integrations/gitlab/rules.d.ts +10 -4
- package/dist/integrations/gitlab/rules.d.ts.map +1 -1
- package/dist/integrations/gitlab/rules.js +32 -8
- package/dist/integrations/gitlab/rules.js.map +1 -1
- package/dist/integrations/incidentio/integration.d.ts +2 -1
- package/dist/integrations/incidentio/integration.d.ts.map +1 -1
- package/dist/integrations/incidentio/integration.js +7 -7
- package/dist/integrations/incidentio/integration.js.map +1 -1
- package/dist/integrations/incidentio/issue-reconciler.d.ts +7 -0
- package/dist/integrations/incidentio/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/incidentio/issue-reconciler.js +36 -1
- package/dist/integrations/incidentio/issue-reconciler.js.map +1 -1
- package/dist/integrations/incidentio/reconciliation-config.d.ts +0 -1
- package/dist/integrations/incidentio/reconciliation-config.d.ts.map +1 -1
- package/dist/integrations/incidentio/reconciliation-config.js +2 -5
- package/dist/integrations/incidentio/reconciliation-config.js.map +1 -1
- package/dist/integrations/incidentio/routes.d.ts +24 -8
- package/dist/integrations/incidentio/routes.d.ts.map +1 -1
- package/dist/integrations/incidentio/routes.js +33 -35
- package/dist/integrations/incidentio/routes.js.map +1 -1
- package/dist/integrations/incidentio/rules.d.ts +0 -4
- package/dist/integrations/incidentio/rules.d.ts.map +1 -1
- package/dist/integrations/incidentio/rules.js +17 -14
- package/dist/integrations/incidentio/rules.js.map +1 -1
- package/dist/integrations/intake-discovery.d.ts +44 -0
- package/dist/integrations/intake-discovery.d.ts.map +1 -0
- package/dist/integrations/intake-discovery.js +60 -0
- package/dist/integrations/intake-discovery.js.map +1 -0
- package/dist/integrations/issue-reconcile-worker.js +1 -1
- package/dist/integrations/issue-reconcile-worker.js.map +1 -1
- package/dist/integrations/issue-reconciler.d.ts +7 -0
- package/dist/integrations/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/issue-reconciler.js +47 -12
- package/dist/integrations/issue-reconciler.js.map +1 -1
- package/dist/integrations/jira/integration.d.ts +3 -2
- package/dist/integrations/jira/integration.d.ts.map +1 -1
- package/dist/integrations/jira/integration.js +5 -7
- package/dist/integrations/jira/integration.js.map +1 -1
- package/dist/integrations/jira/issue-reconciler.d.ts +17 -1
- package/dist/integrations/jira/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/jira/issue-reconciler.js +34 -1
- package/dist/integrations/jira/issue-reconciler.js.map +1 -1
- package/dist/integrations/jira/reconciliation-config.d.ts +0 -1
- package/dist/integrations/jira/reconciliation-config.d.ts.map +1 -1
- package/dist/integrations/jira/reconciliation-config.js +2 -5
- package/dist/integrations/jira/reconciliation-config.js.map +1 -1
- package/dist/integrations/jira/routes.d.ts +0 -7
- package/dist/integrations/jira/routes.d.ts.map +1 -1
- package/dist/integrations/jira/routes.js +2 -12
- package/dist/integrations/jira/routes.js.map +1 -1
- package/dist/integrations/jira/rules.d.ts +0 -4
- package/dist/integrations/jira/rules.d.ts.map +1 -1
- package/dist/integrations/jira/rules.js +3 -13
- package/dist/integrations/jira/rules.js.map +1 -1
- package/dist/integrations/kept-cards.d.ts +49 -0
- package/dist/integrations/kept-cards.d.ts.map +1 -0
- package/dist/integrations/kept-cards.js +97 -0
- package/dist/integrations/kept-cards.js.map +1 -0
- package/dist/integrations/linear/intake-discovery.d.ts +34 -0
- package/dist/integrations/linear/intake-discovery.d.ts.map +1 -0
- package/dist/integrations/linear/intake-discovery.js +112 -0
- package/dist/integrations/linear/intake-discovery.js.map +1 -0
- package/dist/integrations/linear/integration.d.ts.map +1 -1
- package/dist/integrations/linear/integration.js +1 -4
- package/dist/integrations/linear/integration.js.map +1 -1
- package/dist/integrations/linear/issue-reconciler.d.ts +13 -4
- package/dist/integrations/linear/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/linear/issue-reconciler.js +24 -20
- package/dist/integrations/linear/issue-reconciler.js.map +1 -1
- package/dist/integrations/linear/reconciliation-config.d.ts +0 -1
- package/dist/integrations/linear/reconciliation-config.d.ts.map +1 -1
- package/dist/integrations/linear/reconciliation-config.js +2 -8
- package/dist/integrations/linear/reconciliation-config.js.map +1 -1
- package/dist/integrations/linear/routes.d.ts +0 -2
- package/dist/integrations/linear/routes.d.ts.map +1 -1
- package/dist/integrations/linear/routes.js +3 -9
- package/dist/integrations/linear/routes.js.map +1 -1
- package/dist/integrations/platform/api-client.d.ts +2 -0
- package/dist/integrations/platform/api-client.d.ts.map +1 -1
- package/dist/integrations/platform/api-client.js +6 -1
- package/dist/integrations/platform/api-client.js.map +1 -1
- package/dist/integrations/platform/connect/routes.js +4 -1
- package/dist/integrations/platform/connect/routes.js.map +1 -1
- package/dist/integrations/platform/github/event-worker.d.ts +12 -0
- package/dist/integrations/platform/github/event-worker.d.ts.map +1 -1
- package/dist/integrations/platform/github/event-worker.js +56 -5
- package/dist/integrations/platform/github/event-worker.js.map +1 -1
- package/dist/integrations/platform/github/integration.d.ts +1 -0
- package/dist/integrations/platform/github/integration.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.js +8 -3
- package/dist/integrations/platform/github/integration.js.map +1 -1
- package/dist/integrations/platform/gitlab/event-worker.js +1 -1
- package/dist/integrations/platform/gitlab/event-worker.js.map +1 -1
- package/dist/integrations/platform/incidentio/integration.d.ts +3 -2
- package/dist/integrations/platform/incidentio/integration.d.ts.map +1 -1
- package/dist/integrations/platform/incidentio/integration.js +7 -7
- package/dist/integrations/platform/incidentio/integration.js.map +1 -1
- package/dist/integrations/platform/jira/integration.d.ts.map +1 -1
- package/dist/integrations/platform/jira/integration.js +4 -7
- package/dist/integrations/platform/jira/integration.js.map +1 -1
- package/dist/integrations/platform/jira/routes.d.ts +0 -7
- package/dist/integrations/platform/jira/routes.d.ts.map +1 -1
- package/dist/integrations/platform/jira/routes.js +2 -12
- package/dist/integrations/platform/jira/routes.js.map +1 -1
- package/dist/integrations/platform/linear/event-worker.d.ts +2 -2
- package/dist/integrations/platform/linear/event-worker.d.ts.map +1 -1
- package/dist/integrations/platform/linear/event-worker.js +1 -1
- package/dist/integrations/platform/linear/event-worker.js.map +1 -1
- package/dist/integrations/platform/linear/integration.d.ts +1 -0
- package/dist/integrations/platform/linear/integration.d.ts.map +1 -1
- package/dist/integrations/platform/linear/integration.js +7 -7
- package/dist/integrations/platform/linear/integration.js.map +1 -1
- package/dist/integrations/platform/vanta/integration.d.ts +7 -2
- package/dist/integrations/platform/vanta/integration.d.ts.map +1 -1
- package/dist/integrations/platform/vanta/integration.js +22 -6
- package/dist/integrations/platform/vanta/integration.js.map +1 -1
- package/dist/integrations/reconciliation-config.d.ts +0 -1
- package/dist/integrations/reconciliation-config.d.ts.map +1 -1
- package/dist/integrations/reconciliation-config.js +1 -8
- package/dist/integrations/reconciliation-config.js.map +1 -1
- package/dist/integrations/slack/channel-reply-processor.js +1 -1
- package/dist/integrations/slack/channel-reply-processor.js.map +1 -1
- package/dist/integrations/startup-summary.d.ts +8 -0
- package/dist/integrations/startup-summary.d.ts.map +1 -0
- package/dist/integrations/startup-summary.js +36 -0
- package/dist/integrations/startup-summary.js.map +1 -0
- package/dist/integrations/vanta/sync.d.ts +9 -5
- package/dist/integrations/vanta/sync.d.ts.map +1 -1
- package/dist/integrations/vanta/sync.js +16 -8
- package/dist/integrations/vanta/sync.js.map +1 -1
- package/dist/linked-repositories-changed.d.ts +14 -0
- package/dist/linked-repositories-changed.d.ts.map +1 -0
- package/dist/linked-repositories-changed.js +48 -0
- package/dist/linked-repositories-changed.js.map +1 -0
- package/dist/routes/contracts.d.ts +117 -0
- package/dist/routes/contracts.d.ts.map +1 -1
- package/dist/routes/contracts.js +44 -1
- package/dist/routes/contracts.js.map +1 -1
- package/dist/routes/run-queue.d.ts +17 -0
- package/dist/routes/run-queue.d.ts.map +1 -0
- package/dist/routes/run-queue.js +69 -0
- package/dist/routes/run-queue.js.map +1 -0
- package/dist/routes/surface.d.ts +8 -0
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +4 -2
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/work-item-selection.d.ts +4 -1
- package/dist/routes/work-item-selection.d.ts.map +1 -1
- package/dist/routes/work-item-selection.js +7 -2
- package/dist/routes/work-item-selection.js.map +1 -1
- package/dist/routes/work-items.d.ts +5 -0
- package/dist/routes/work-items.d.ts.map +1 -1
- package/dist/routes/work-items.js +17 -0
- package/dist/routes/work-items.js.map +1 -1
- package/dist/rules/dispatcher.d.ts +13 -1
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +9 -2
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/rules/review-source-tool.js +2 -1
- package/dist/rules/review-source-tool.js.map +1 -1
- package/dist/storage/domains/projects/base.d.ts +2 -0
- package/dist/storage/domains/projects/base.d.ts.map +1 -1
- package/dist/storage/domains/projects/base.js +13 -1
- package/dist/storage/domains/projects/base.js.map +1 -1
- package/dist/storage/domains/source-control/base.d.ts +32 -0
- package/dist/storage/domains/source-control/base.d.ts.map +1 -1
- package/dist/storage/domains/source-control/base.js +54 -4
- package/dist/storage/domains/source-control/base.js.map +1 -1
- package/dist/storage/domains/source-control/inmemory.d.ts +3 -0
- package/dist/storage/domains/source-control/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/source-control/inmemory.js +17 -0
- package/dist/storage/domains/source-control/inmemory.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +1 -0
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +9 -0
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/dist/timing.d.ts +8 -1
- package/dist/timing.d.ts.map +1 -1
- package/dist/timing.js +10 -2
- package/dist/timing.js.map +1 -1
- package/dist/work-items/source-external-id.d.ts +4 -0
- package/dist/work-items/source-external-id.d.ts.map +1 -0
- package/dist/work-items/source-external-id.js +9 -0
- package/dist/work-items/source-external-id.js.map +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// src/integrations/startup-summary.ts
|
|
2
|
+
const DISPLAY_NAMES = {
|
|
3
|
+
github: "GitHub",
|
|
4
|
+
gitlab: "GitLab",
|
|
5
|
+
incidentio: "incident.io",
|
|
6
|
+
jira: "Jira",
|
|
7
|
+
linear: "Linear",
|
|
8
|
+
vanta: "Vanta"
|
|
9
|
+
};
|
|
10
|
+
function displayName(id) {
|
|
11
|
+
return DISPLAY_NAMES[id] ?? id;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* One line saying which integrations have a connected account, so a fresh
|
|
15
|
+
* project doesn't read as if every provider were in use.
|
|
16
|
+
*/
|
|
17
|
+
async function describeIntegrations(integrations) {
|
|
18
|
+
const statuses = await Promise.all(integrations.map((integration) => integration.hasActiveConnections?.().then((connected) => connected ? "connected" : "available", () => "status unknown")));
|
|
19
|
+
const groups = {
|
|
20
|
+
connected: [],
|
|
21
|
+
available: [],
|
|
22
|
+
"status unknown": []
|
|
23
|
+
};
|
|
24
|
+
statuses.forEach((status, i) => status && groups[status].push(displayName(integrations[i].id)));
|
|
25
|
+
const parts = Object.entries(groups).filter(([, names]) => names.length > 0).map(([status, names]) => `${names.join(", ")} ${status}`);
|
|
26
|
+
if (parts.length === 0) return void 0;
|
|
27
|
+
if (groups.connected.length === 0 && groups["status unknown"].length === 0) parts.unshift("none connected");
|
|
28
|
+
return `Intake: ${parts.join(" · ")}`;
|
|
29
|
+
}
|
|
30
|
+
async function logIntegrationSummary(integrations) {
|
|
31
|
+
const line = await describeIntegrations(integrations);
|
|
32
|
+
if (line) console.info(`◇ ${line}`);
|
|
33
|
+
}
|
|
34
|
+
export { describeIntegrations, logIntegrationSummary };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=startup-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startup-summary.js","names":[],"sources":["../../src/integrations/startup-summary.ts"],"sourcesContent":["import type { FactoryIntegration } from './base.js';\n\nconst DISPLAY_NAMES: Record<string, string> = {\n github: 'GitHub',\n gitlab: 'GitLab',\n incidentio: 'incident.io',\n jira: 'Jira',\n linear: 'Linear',\n vanta: 'Vanta',\n};\n\nfunction displayName(id: string): string {\n return DISPLAY_NAMES[id] ?? id;\n}\n\n/**\n * One line saying which integrations have a connected account, so a fresh\n * project doesn't read as if every provider were in use.\n */\nexport async function describeIntegrations(integrations: readonly FactoryIntegration[]): Promise<string | undefined> {\n const statuses = await Promise.all(\n integrations.map(integration =>\n integration.hasActiveConnections?.().then(\n connected => (connected ? 'connected' : 'available'),\n () => 'status unknown' as const,\n ),\n ),\n );\n const groups = { connected: [] as string[], available: [] as string[], 'status unknown': [] as string[] };\n statuses.forEach((status, i) => status && groups[status].push(displayName(integrations[i]!.id)));\n\n const parts = Object.entries(groups)\n .filter(([, names]) => names.length > 0)\n .map(([status, names]) => `${names.join(', ')} ${status}`);\n if (parts.length === 0) return undefined;\n if (groups.connected.length === 0 && groups['status unknown'].length === 0) parts.unshift('none connected');\n return `Intake: ${parts.join(' · ')}`;\n}\n\nexport async function logIntegrationSummary(integrations: readonly FactoryIntegration[]): Promise<void> {\n const line = await describeIntegrations(integrations);\n if (line) console.info(`◇ ${line}`);\n}\n"],"mappings":";AAEA,MAAM,gBAAwC;CAC5C,QAAQ;CACR,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,QAAQ;CACR,OAAO;AACT;AAEA,SAAS,YAAY,IAAoB;CACvC,OAAO,cAAc,OAAO;AAC9B;;;;;AAMA,eAAsB,qBAAqB,cAA0E;CACnH,MAAM,WAAW,MAAM,QAAQ,IAC7B,aAAa,KAAI,gBACf,YAAY,uBAAuB,CAAC,CAAC,MACnC,cAAc,YAAY,cAAc,mBAClC,gBACR,CACF,CACF;CACA,MAAM,SAAS;EAAE,WAAW,CAAC;EAAe,WAAW,CAAC;EAAe,kBAAkB,CAAC;CAAc;CACxG,SAAS,SAAS,QAAQ,MAAM,UAAU,OAAO,OAAO,CAAC,KAAK,YAAY,aAAa,EAAE,CAAE,EAAE,CAAC,CAAC;CAE/F,MAAM,QAAQ,OAAO,QAAQ,MAAM,CAAC,CACjC,QAAQ,GAAG,WAAW,MAAM,SAAS,CAAC,CAAC,CACvC,KAAK,CAAC,QAAQ,WAAW,GAAG,MAAM,KAAK,IAAI,EAAE,GAAG,QAAQ;CAC3D,IAAI,MAAM,WAAW,GAAG,OAAO,KAAA;CAC/B,IAAI,OAAO,UAAU,WAAW,KAAK,OAAO,iBAAiB,CAAC,WAAW,GAAG,MAAM,QAAQ,gBAAgB;CAC1G,OAAO,WAAW,MAAM,KAAK,KAAK;AACpC;AAEA,eAAsB,sBAAsB,cAA4D;CACtG,MAAM,OAAO,MAAM,qBAAqB,YAAY;CACpD,IAAI,MAAM,QAAQ,KAAK,KAAK,MAAM;AACpC"}
|
|
@@ -14,15 +14,19 @@ export interface VantaVulnerability {
|
|
|
14
14
|
firstDetectedDate?: string | null;
|
|
15
15
|
externalURL?: string | null;
|
|
16
16
|
}
|
|
17
|
-
/** Lists
|
|
18
|
-
export type VantaVulnerabilityLister = () => Promise<VantaVulnerability[]>;
|
|
17
|
+
/** Lists a complete snapshot for one org, or null when its connections cannot be reconciled safely. */
|
|
18
|
+
export type VantaVulnerabilityLister = (orgId: string) => Promise<VantaVulnerability[] | null>;
|
|
19
19
|
export declare function toVantaIngress(vulnerability: VantaVulnerability): VantaVulnerabilityIngress;
|
|
20
20
|
/**
|
|
21
|
-
* Reads
|
|
22
|
-
*
|
|
23
|
-
* vulnerabilities source to it or binds it to no project at all.
|
|
21
|
+
* Reads a complete snapshot for each organization and hands it to that organization's
|
|
22
|
+
* Factory projects taking Vanta intake. Unavailable snapshots are never reconciled.
|
|
24
23
|
*/
|
|
25
24
|
export declare function createVantaSync(options: {
|
|
25
|
+
/**
|
|
26
|
+
* Whether any Vanta connection is active. Without one the vulnerability list
|
|
27
|
+
* is empty, which would read as every filed vulnerability being resolved.
|
|
28
|
+
*/
|
|
29
|
+
connected: () => Promise<boolean>;
|
|
26
30
|
listVulnerabilities: VantaVulnerabilityLister;
|
|
27
31
|
listProjects: () => Promise<ReadonlyArray<{
|
|
28
32
|
orgId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/integrations/vanta/sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,+BAA+B,0BAA0B,CAAC;AACvE,eAAO,MAAM,8BAA8B,QAAc,CAAC;AAE1D,0EAA0E;AAC1E,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CA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,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;IAC1E,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACtD,MAAM,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACvD,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAkDvC"}
|
|
@@ -21,9 +21,8 @@ function toVantaIngress(vulnerability) {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Reads
|
|
25
|
-
*
|
|
26
|
-
* vulnerabilities source to it or binds it to no project at all.
|
|
24
|
+
* Reads a complete snapshot for each organization and hands it to that organization's
|
|
25
|
+
* Factory projects taking Vanta intake. Unavailable snapshots are never reconciled.
|
|
27
26
|
*/
|
|
28
27
|
function createVantaSync(options) {
|
|
29
28
|
return async () => {
|
|
@@ -36,28 +35,37 @@ function createVantaSync(options) {
|
|
|
36
35
|
failed: 0,
|
|
37
36
|
errors: []
|
|
38
37
|
};
|
|
38
|
+
if (!await options.connected()) return summary;
|
|
39
39
|
const projects = await options.listProjects();
|
|
40
40
|
if (projects.length === 0) return summary;
|
|
41
|
-
const vulnerabilities = (await options.listVulnerabilities()).map(toVantaIngress);
|
|
42
41
|
const orgTargets = /* @__PURE__ */ new Map();
|
|
43
42
|
for (const project of projects) try {
|
|
44
43
|
let target = orgTargets.get(project.orgId);
|
|
45
44
|
if (!target) {
|
|
45
|
+
const enabled = await options.intakeEnabled(project.orgId);
|
|
46
46
|
target = {
|
|
47
|
-
enabled
|
|
48
|
-
bound: await options.boundProjectIds(project.orgId)
|
|
47
|
+
enabled,
|
|
48
|
+
bound: enabled ? await options.boundProjectIds(project.orgId) : [],
|
|
49
|
+
loaded: false,
|
|
50
|
+
vulnerabilities: null
|
|
49
51
|
};
|
|
50
52
|
orgTargets.set(project.orgId, target);
|
|
51
53
|
}
|
|
52
54
|
if (!target.enabled || target.bound.length > 0 && !target.bound.includes(project.id)) continue;
|
|
55
|
+
if (!target.loaded) {
|
|
56
|
+
const snapshot = await options.listVulnerabilities(project.orgId);
|
|
57
|
+
target.vulnerabilities = snapshot?.map(toVantaIngress) ?? null;
|
|
58
|
+
target.loaded = true;
|
|
59
|
+
}
|
|
60
|
+
if (target.vulnerabilities === null) continue;
|
|
53
61
|
await options.ingest({
|
|
54
62
|
orgId: project.orgId,
|
|
55
63
|
userId: options.userId,
|
|
56
64
|
factoryProjectId: project.id,
|
|
57
|
-
vulnerabilities
|
|
65
|
+
vulnerabilities: target.vulnerabilities
|
|
58
66
|
});
|
|
59
67
|
summary.projects += 1;
|
|
60
|
-
summary.checked += vulnerabilities.length;
|
|
68
|
+
summary.checked += target.vulnerabilities.length;
|
|
61
69
|
} catch (error) {
|
|
62
70
|
summary.failed += 1;
|
|
63
71
|
summary.errors.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","names":[],"sources":["../../../src/integrations/vanta/sync.ts"],"sourcesContent":["import type { IssueReconcileSummary } from '../issue-reconciler.js';\nimport { vantaLabels } from './rules.js';\nimport type { VantaRulesIngress, VantaVulnerabilityIngress } from './rules.js';\n\nexport const VANTA_VULNERABILITIES_SOURCE_ID = 'vanta:vulnerabilities';\nexport const DEFAULT_VANTA_SYNC_INTERVAL_MS = 15 * 60_000;\n\n/** The subset of Vanta's `GET /v1/vulnerabilities` item Factory reads. */\nexport interface VantaVulnerability {\n id: string;\n name: string;\n description?: string | null;\n packageIdentifier?: string | null;\n severity?: string | null;\n isFixable?: boolean | null;\n remediateByDate?: string | null;\n firstDetectedDate?: string | null;\n externalURL?: string | null;\n}\n\n/** Lists
|
|
1
|
+
{"version":3,"file":"sync.js","names":[],"sources":["../../../src/integrations/vanta/sync.ts"],"sourcesContent":["import type { IssueReconcileSummary } from '../issue-reconciler.js';\nimport { vantaLabels } from './rules.js';\nimport type { VantaRulesIngress, VantaVulnerabilityIngress } from './rules.js';\n\nexport const VANTA_VULNERABILITIES_SOURCE_ID = 'vanta:vulnerabilities';\nexport const DEFAULT_VANTA_SYNC_INTERVAL_MS = 15 * 60_000;\n\n/** The subset of Vanta's `GET /v1/vulnerabilities` item Factory reads. */\nexport interface VantaVulnerability {\n id: string;\n name: string;\n description?: string | null;\n packageIdentifier?: string | null;\n severity?: string | null;\n isFixable?: boolean | null;\n remediateByDate?: string | null;\n firstDetectedDate?: string | null;\n externalURL?: string | null;\n}\n\n/** Lists a complete snapshot for one org, or null when its connections cannot be reconciled safely. */\nexport type VantaVulnerabilityLister = (orgId: string) => Promise<VantaVulnerability[] | null>;\n\nexport function toVantaIngress(vulnerability: VantaVulnerability): VantaVulnerabilityIngress {\n const severity = vulnerability.severity?.toLowerCase() ?? null;\n const packageIdentifier = vulnerability.packageIdentifier ?? null;\n return {\n id: vulnerability.id,\n name: vulnerability.name,\n title: packageIdentifier ? `${packageIdentifier}: ${vulnerability.name}` : vulnerability.name,\n description:\n vulnerability.description && vulnerability.description !== vulnerability.name ? vulnerability.description : null,\n url: vulnerability.externalURL ?? null,\n state: 'open',\n severity,\n packageIdentifier,\n fixable: vulnerability.isFixable ?? null,\n remediateBy: vulnerability.remediateByDate ?? null,\n labels: vantaLabels(severity),\n createdAt: vulnerability.firstDetectedDate ?? new Date(0).toISOString(),\n };\n}\n\n/**\n * Reads a complete snapshot for each organization and hands it to that organization's\n * Factory projects taking Vanta intake. Unavailable snapshots are never reconciled.\n */\nexport function createVantaSync(options: {\n /**\n * Whether any Vanta connection is active. Without one the vulnerability list\n * is empty, which would read as every filed vulnerability being resolved.\n */\n connected: () => Promise<boolean>;\n listVulnerabilities: VantaVulnerabilityLister;\n listProjects: () => Promise<ReadonlyArray<{ orgId: string; id: string }>>;\n intakeEnabled: (orgId: string) => Promise<boolean>;\n boundProjectIds: (orgId: string) => Promise<string[]>;\n ingest: (input: VantaRulesIngress) => Promise<unknown>;\n userId: string;\n}): () => Promise<IssueReconcileSummary> {\n return async () => {\n const summary: IssueReconcileSummary = {\n projects: 0,\n checked: 0,\n updated: 0,\n closed: 0,\n missing: 0,\n failed: 0,\n errors: [],\n };\n if (!(await options.connected())) return summary;\n const projects = await options.listProjects();\n if (projects.length === 0) return summary;\n const orgTargets = new Map<string, { enabled: boolean; bound: string[]; loaded: boolean; vulnerabilities: VantaVulnerabilityIngress[] | null }>();\n for (const project of projects) {\n try {\n let target = orgTargets.get(project.orgId);\n if (!target) {\n const enabled = await options.intakeEnabled(project.orgId);\n target = {\n enabled,\n bound: enabled ? await options.boundProjectIds(project.orgId) : [],\n loaded: false,\n vulnerabilities: null,\n };\n orgTargets.set(project.orgId, target);\n }\n if (!target.enabled || (target.bound.length > 0 && !target.bound.includes(project.id))) continue;\n if (!target.loaded) {\n const snapshot = await options.listVulnerabilities(project.orgId);\n target.vulnerabilities = snapshot?.map(toVantaIngress) ?? null;\n target.loaded = true;\n }\n if (target.vulnerabilities === null) continue;\n await options.ingest({\n orgId: project.orgId,\n userId: options.userId,\n factoryProjectId: project.id,\n vulnerabilities: target.vulnerabilities,\n });\n summary.projects += 1;\n summary.checked += target.vulnerabilities.length;\n } catch (error) {\n summary.failed += 1;\n summary.errors.push({ projectId: project.id, error: error instanceof Error ? error.message : String(error) });\n }\n }\n return summary;\n };\n}\n"],"mappings":";;AAIA,MAAa,kCAAkC;AAC/C,MAAa,iCAAiC;AAkB9C,SAAgB,eAAe,eAA8D;CAC3F,MAAM,WAAW,cAAc,UAAU,YAAY,KAAK;CAC1D,MAAM,oBAAoB,cAAc,qBAAqB;CAC7D,OAAO;EACL,IAAI,cAAc;EAClB,MAAM,cAAc;EACpB,OAAO,oBAAoB,GAAG,kBAAkB,IAAI,cAAc,SAAS,cAAc;EACzF,aACE,cAAc,eAAe,cAAc,gBA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iB,OAAO;GAC1B,CAAC;GACD,QAAQ,YAAY;GACpB,QAAQ,WAAW,OAAO,gBAAgB;EAC5C,SAAS,OAAO;GACd,QAAQ,UAAU;GAClB,QAAQ,OAAO,KAAK;IAAE,WAAW,QAAQ;IAAI,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GAAE,CAAC;EAC9G;EAEF,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PubSub } from '@mastra/core/events';
|
|
2
|
+
import type { SourceControlStorage } from './storage/domains/source-control/base.js';
|
|
3
|
+
/** One topic for every integration; the event names the integration whose links changed. */
|
|
4
|
+
export declare const LINKED_REPOSITORIES_CHANGED_TOPIC = "factory.linked-repositories";
|
|
5
|
+
/**
|
|
6
|
+
* Carries this replica's linked-repository changes to the other replicas, and
|
|
7
|
+
* theirs to this replica's listeners, so whichever replica holds a polling
|
|
8
|
+
* lease hears of a link made anywhere. Publishes are never awaited — a slow or
|
|
9
|
+
* dead broker must not hold up the write it describes. If subscribing fails,
|
|
10
|
+
* this replica keeps announcing its own changes and its readers keep
|
|
11
|
+
* re-reading the set. Resolves to the unsubscribe.
|
|
12
|
+
*/
|
|
13
|
+
export declare function shareLinkedRepositoryChanges(pubsub: PubSub, sourceControl: Pick<SourceControlStorage, 'onLinkedRepositoriesChanged' | 'linkedRepositoriesChanged' | 'setLinkedRepositoryChangesShared'>): Promise<() => Promise<void>>;
|
|
14
|
+
//# sourceMappingURL=linked-repositories-changed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linked-repositories-changed.d.ts","sourceRoot":"","sources":["../src/linked-repositories-changed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAErF,4FAA4F;AAC5F,eAAO,MAAM,iCAAiC,gCAAgC,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,IAAI,CACjB,oBAAoB,EACpB,6BAA6B,GAAG,2BAA2B,GAAG,kCAAkC,CACjG,GACA,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAoC9B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { withAck } from "@mastra/core/events";
|
|
2
|
+
// src/linked-repositories-changed.ts
|
|
3
|
+
/** One topic for every integration; the event names the integration whose links changed. */
|
|
4
|
+
const LINKED_REPOSITORIES_CHANGED_TOPIC = "factory.linked-repositories";
|
|
5
|
+
/**
|
|
6
|
+
* Carries this replica's linked-repository changes to the other replicas, and
|
|
7
|
+
* theirs to this replica's listeners, so whichever replica holds a polling
|
|
8
|
+
* lease hears of a link made anywhere. Publishes are never awaited — a slow or
|
|
9
|
+
* dead broker must not hold up the write it describes. If subscribing fails,
|
|
10
|
+
* this replica keeps announcing its own changes and its readers keep
|
|
11
|
+
* re-reading the set. Resolves to the unsubscribe.
|
|
12
|
+
*/
|
|
13
|
+
async function shareLinkedRepositoryChanges(pubsub, sourceControl) {
|
|
14
|
+
const origin = globalThis.crypto.randomUUID();
|
|
15
|
+
const stopPublishing = sourceControl.onLinkedRepositoriesChanged(({ integrationId, local }) => {
|
|
16
|
+
if (!local) return;
|
|
17
|
+
pubsub.publish(LINKED_REPOSITORIES_CHANGED_TOPIC, {
|
|
18
|
+
type: "factory.linked-repositories.changed",
|
|
19
|
+
runId: origin,
|
|
20
|
+
data: { integrationId }
|
|
21
|
+
}).catch((error) => {
|
|
22
|
+
console.warn("[Factory] Failed to announce a linked repository change", { error: error instanceof Error ? error.message : String(error) });
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
const onEvent = withAck(async (event) => {
|
|
26
|
+
if (event.runId === origin) return;
|
|
27
|
+
const { integrationId } = event.data ?? {};
|
|
28
|
+
if (typeof integrationId === "string") sourceControl.linkedRepositoriesChanged({
|
|
29
|
+
integrationId,
|
|
30
|
+
local: false
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
try {
|
|
34
|
+
await pubsub.subscribe(LINKED_REPOSITORIES_CHANGED_TOPIC, onEvent, { startFrom: "latest" });
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.warn(`[factory] subscribing to linked repository changes failed; the GitHub event poll reads linked repositories from the database on every tick: ${error instanceof Error ? error.message : error}`);
|
|
37
|
+
return async () => stopPublishing();
|
|
38
|
+
}
|
|
39
|
+
sourceControl.setLinkedRepositoryChangesShared(true);
|
|
40
|
+
return async () => {
|
|
41
|
+
sourceControl.setLinkedRepositoryChangesShared(false);
|
|
42
|
+
stopPublishing();
|
|
43
|
+
await pubsub.unsubscribe(LINKED_REPOSITORIES_CHANGED_TOPIC, onEvent);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export { LINKED_REPOSITORIES_CHANGED_TOPIC, shareLinkedRepositoryChanges };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=linked-repositories-changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linked-repositories-changed.js","names":[],"sources":["../src/linked-repositories-changed.ts"],"sourcesContent":["import type { EventCallback, PubSub } from '@mastra/core/events';\nimport { withAck } from '@mastra/core/events';\n\nimport type { SourceControlStorage } from './storage/domains/source-control/base.js';\n\n/** One topic for every integration; the event names the integration whose links changed. */\nexport const LINKED_REPOSITORIES_CHANGED_TOPIC = 'factory.linked-repositories';\n\n/**\n * Carries this replica's linked-repository changes to the other replicas, and\n * theirs to this replica's listeners, so whichever replica holds a polling\n * lease hears of a link made anywhere. Publishes are never awaited — a slow or\n * dead broker must not hold up the write it describes. If subscribing fails,\n * this replica keeps announcing its own changes and its readers keep\n * re-reading the set. Resolves to the unsubscribe.\n */\nexport async function shareLinkedRepositoryChanges(\n pubsub: PubSub,\n sourceControl: Pick<\n SourceControlStorage,\n 'onLinkedRepositoriesChanged' | 'linkedRepositoriesChanged' | 'setLinkedRepositoryChangesShared'\n >,\n): Promise<() => Promise<void>> {\n const origin = globalThis.crypto.randomUUID();\n const stopPublishing = sourceControl.onLinkedRepositoriesChanged(({ integrationId, local }) => {\n if (!local) return;\n pubsub\n .publish(LINKED_REPOSITORIES_CHANGED_TOPIC, {\n type: 'factory.linked-repositories.changed',\n runId: origin,\n data: { integrationId },\n })\n .catch((error: unknown) => {\n console.warn('[Factory] Failed to announce a linked repository change', {\n error: error instanceof Error ? error.message : String(error),\n });\n });\n });\n const onEvent: EventCallback = withAck(async event => {\n if (event.runId === origin) return;\n const { integrationId } = (event.data ?? {}) as { integrationId?: unknown };\n if (typeof integrationId === 'string') sourceControl.linkedRepositoriesChanged({ integrationId, local: false });\n });\n try {\n // Without `latest`, a retaining broker replays old changes on boot.\n await pubsub.subscribe(LINKED_REPOSITORIES_CHANGED_TOPIC, onEvent, { startFrom: 'latest' });\n } catch (error) {\n console.warn(\n `[factory] subscribing to linked repository changes failed; the GitHub event poll reads linked repositories from the database on every tick: ${error instanceof Error ? error.message : error}`,\n );\n return async () => stopPublishing();\n }\n sourceControl.setLinkedRepositoryChangesShared(true);\n return async () => {\n sourceControl.setLinkedRepositoryChangesShared(false);\n stopPublishing();\n await pubsub.unsubscribe(LINKED_REPOSITORIES_CHANGED_TOPIC, onEvent);\n };\n}\n"],"mappings":";;;AAMA,MAAa,oCAAoC;;;;;;;;;AAUjD,eAAsB,6BACpB,QACA,eAI8B;CAC9B,MAAM,SAAS,WAAW,OAAO,WAAW;CAC5C,MAAM,iBAAiB,cAAc,6BAA6B,EAAE,eAAe,YAAY;EAC7F,IAAI,CAAC,OAAO;EACZ,OACG,QAAQ,mCAAmC;GAC1C,MAAM;GACN,OAAO;GACP,MAAM,EAAE,cAAc;EACxB,CAAC,CAAC,CACD,OAAO,UAAmB;GACzB,QAAQ,KAAK,2DAA2D,EACtE,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAC9D,CAAC;EACH,CAAC;CACL,CAAC;CACD,MAAM,UAAyB,QAAQ,OAAM,UAAS;EACpD,IAAI,MAAM,UAAU,QAAQ;EAC5B,MAAM,EAAE,kBAAmB,MAAM,QAAQ,CAAC;EAC1C,IAAI,OAAO,kBAAkB,UAAU,cAAc,0BAA0B;GAAE;GAAe,OAAO;EAAM,CAAC;CAChH,CAAC;CACD,IAAI;EAEF,MAAM,OAAO,UAAU,mCAAmC,SAAS,EAAE,WAAW,SAAS,CAAC;CAC5F,SAAS,OAAO;EACd,QAAQ,KACN,+IAA+I,iBAAiB,QAAQ,MAAM,UAAU,OAC1L;EACA,OAAO,YAAY,eAAe;CACpC;CACA,cAAc,iCAAiC,IAAI;CACnD,OAAO,YAAY;EACjB,cAAc,iCAAiC,KAAK;EACpD,eAAe;EACf,MAAM,OAAO,YAAY,mCAAmC,OAAO;CACrE;AACF"}
|
|
@@ -116,6 +116,61 @@ export declare const projectListRepositorySchema: z.ZodObject<{
|
|
|
116
116
|
sandboxWorkdir: z.ZodString;
|
|
117
117
|
}, z.core.$strip>;
|
|
118
118
|
export type ProjectListRepository = z.infer<typeof projectListRepositorySchema>;
|
|
119
|
+
export declare const runQueueResponseSchema: z.ZodObject<{
|
|
120
|
+
slots: z.ZodNullable<z.ZodObject<{
|
|
121
|
+
scope: z.ZodLiteral<"server">;
|
|
122
|
+
inUse: z.ZodNumber;
|
|
123
|
+
cap: z.ZodNumber;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
running: z.ZodNumber;
|
|
126
|
+
claimed: z.ZodArray<z.ZodObject<{
|
|
127
|
+
decisionId: z.ZodString;
|
|
128
|
+
state: z.ZodEnum<{
|
|
129
|
+
claimed: "claimed";
|
|
130
|
+
waiting: "waiting";
|
|
131
|
+
}>;
|
|
132
|
+
type: z.ZodEnum<{
|
|
133
|
+
invokeSkill: "invokeSkill";
|
|
134
|
+
sendMessage: "sendMessage";
|
|
135
|
+
signalActivity: "signalActivity";
|
|
136
|
+
}>;
|
|
137
|
+
role: z.ZodNullable<z.ZodString>;
|
|
138
|
+
skillName: z.ZodNullable<z.ZodString>;
|
|
139
|
+
queuedSince: z.ZodString;
|
|
140
|
+
workItem: z.ZodNullable<z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
key: z.ZodNullable<z.ZodString>;
|
|
143
|
+
title: z.ZodString;
|
|
144
|
+
board: z.ZodNullable<z.ZodString>;
|
|
145
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
146
|
+
}, z.core.$strip>>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
queuedCount: z.ZodNumber;
|
|
149
|
+
queued: z.ZodArray<z.ZodObject<{
|
|
150
|
+
decisionId: z.ZodString;
|
|
151
|
+
state: z.ZodEnum<{
|
|
152
|
+
claimed: "claimed";
|
|
153
|
+
waiting: "waiting";
|
|
154
|
+
}>;
|
|
155
|
+
type: z.ZodEnum<{
|
|
156
|
+
invokeSkill: "invokeSkill";
|
|
157
|
+
sendMessage: "sendMessage";
|
|
158
|
+
signalActivity: "signalActivity";
|
|
159
|
+
}>;
|
|
160
|
+
role: z.ZodNullable<z.ZodString>;
|
|
161
|
+
skillName: z.ZodNullable<z.ZodString>;
|
|
162
|
+
queuedSince: z.ZodString;
|
|
163
|
+
workItem: z.ZodNullable<z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
key: z.ZodNullable<z.ZodString>;
|
|
166
|
+
title: z.ZodString;
|
|
167
|
+
board: z.ZodNullable<z.ZodString>;
|
|
168
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
position: z.ZodNumber;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
export type RunQueueResponse = z.infer<typeof runQueueResponseSchema>;
|
|
119
174
|
export declare const createProjectBodySchema: z.ZodObject<{
|
|
120
175
|
name: z.ZodString;
|
|
121
176
|
description: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<string | null, string>>, z.ZodNull]>>>;
|
|
@@ -2093,6 +2148,68 @@ export declare const FACTORY_ROUTE_CONTRACTS: {
|
|
|
2093
2148
|
nextCursor: z.ZodOptional<z.ZodString>;
|
|
2094
2149
|
}, z.core.$strip>;
|
|
2095
2150
|
};
|
|
2151
|
+
readonly runQueue: {
|
|
2152
|
+
readonly method: 'GET';
|
|
2153
|
+
readonly path: '/web/factory/projects/:id/run-queue';
|
|
2154
|
+
readonly description: "List the project's automated runs waiting for a run slot, oldest first, and the runs holding one. The cap is per server process; manual starts are claimed ahead of this queue.";
|
|
2155
|
+
readonly pathSchema: z.ZodObject<{
|
|
2156
|
+
id: z.ZodString;
|
|
2157
|
+
}, z.core.$strip>;
|
|
2158
|
+
readonly responseSchema: z.ZodObject<{
|
|
2159
|
+
slots: z.ZodNullable<z.ZodObject<{
|
|
2160
|
+
scope: z.ZodLiteral<"server">;
|
|
2161
|
+
inUse: z.ZodNumber;
|
|
2162
|
+
cap: z.ZodNumber;
|
|
2163
|
+
}, z.core.$strip>>;
|
|
2164
|
+
running: z.ZodNumber;
|
|
2165
|
+
claimed: z.ZodArray<z.ZodObject<{
|
|
2166
|
+
decisionId: z.ZodString;
|
|
2167
|
+
state: z.ZodEnum<{
|
|
2168
|
+
claimed: "claimed";
|
|
2169
|
+
waiting: "waiting";
|
|
2170
|
+
}>;
|
|
2171
|
+
type: z.ZodEnum<{
|
|
2172
|
+
invokeSkill: "invokeSkill";
|
|
2173
|
+
sendMessage: "sendMessage";
|
|
2174
|
+
signalActivity: "signalActivity";
|
|
2175
|
+
}>;
|
|
2176
|
+
role: z.ZodNullable<z.ZodString>;
|
|
2177
|
+
skillName: z.ZodNullable<z.ZodString>;
|
|
2178
|
+
queuedSince: z.ZodString;
|
|
2179
|
+
workItem: z.ZodNullable<z.ZodObject<{
|
|
2180
|
+
id: z.ZodString;
|
|
2181
|
+
key: z.ZodNullable<z.ZodString>;
|
|
2182
|
+
title: z.ZodString;
|
|
2183
|
+
board: z.ZodNullable<z.ZodString>;
|
|
2184
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
2185
|
+
}, z.core.$strip>>;
|
|
2186
|
+
}, z.core.$strip>>;
|
|
2187
|
+
queuedCount: z.ZodNumber;
|
|
2188
|
+
queued: z.ZodArray<z.ZodObject<{
|
|
2189
|
+
decisionId: z.ZodString;
|
|
2190
|
+
state: z.ZodEnum<{
|
|
2191
|
+
claimed: "claimed";
|
|
2192
|
+
waiting: "waiting";
|
|
2193
|
+
}>;
|
|
2194
|
+
type: z.ZodEnum<{
|
|
2195
|
+
invokeSkill: "invokeSkill";
|
|
2196
|
+
sendMessage: "sendMessage";
|
|
2197
|
+
signalActivity: "signalActivity";
|
|
2198
|
+
}>;
|
|
2199
|
+
role: z.ZodNullable<z.ZodString>;
|
|
2200
|
+
skillName: z.ZodNullable<z.ZodString>;
|
|
2201
|
+
queuedSince: z.ZodString;
|
|
2202
|
+
workItem: z.ZodNullable<z.ZodObject<{
|
|
2203
|
+
id: z.ZodString;
|
|
2204
|
+
key: z.ZodNullable<z.ZodString>;
|
|
2205
|
+
title: z.ZodString;
|
|
2206
|
+
board: z.ZodNullable<z.ZodString>;
|
|
2207
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
2208
|
+
}, z.core.$strip>>;
|
|
2209
|
+
position: z.ZodNumber;
|
|
2210
|
+
}, z.core.$strip>>;
|
|
2211
|
+
}, z.core.$strip>;
|
|
2212
|
+
};
|
|
2096
2213
|
readonly decisionApprove: {
|
|
2097
2214
|
readonly method: 'POST';
|
|
2098
2215
|
readonly path: '/web/factory/projects/:id/decisions/:decisionId/approve';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/routes/contracts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,E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AAI,EAAE,wCAAwC;iBAC9C,WAAW,EAAE,sDAAsD;iBACnE,UAAU;;;;iBACV,UAAU;;;iBACV,cAAc;;;;;iBAGd,MAAM,EAAE,QAAQ;iBAChB,IAAI,EAAE,wCAAwC;iBAC9C,WAAW,EAAE,kEAAkE;iBAC/E,UAAU;;;;iBACV,cAAc;;;;CAEuC,CAAC;AAE1D,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,uBAAuB,CAAC"}
|
package/dist/routes/contracts.js
CHANGED
|
@@ -193,6 +193,42 @@ const cardSchema = z.object({ workItem: z.object({
|
|
|
193
193
|
}).passthrough().optional() }).passthrough();
|
|
194
194
|
const workItemResponseSchema = z.object({ workItem: cardSchema });
|
|
195
195
|
const decisionResponseSchema = z.object({ decision: entitySchema });
|
|
196
|
+
const runQueueEntrySchema = z.object({
|
|
197
|
+
decisionId: z.string(),
|
|
198
|
+
/** `waiting`: no slot yet. `claimed`: a server holds a slot for it, starting or running the run. */
|
|
199
|
+
state: z.enum(["waiting", "claimed"]),
|
|
200
|
+
type: z.enum([
|
|
201
|
+
"invokeSkill",
|
|
202
|
+
"sendMessage",
|
|
203
|
+
"signalActivity"
|
|
204
|
+
]),
|
|
205
|
+
role: z.string().nullable(),
|
|
206
|
+
/** The skill an `invokeSkill` run starts; `null` for a prompt run and for messages and activity. */
|
|
207
|
+
skillName: z.string().nullable(),
|
|
208
|
+
/** When it became claimable for `waiting`, when it was claimed for `claimed`. */
|
|
209
|
+
queuedSince: z.string(),
|
|
210
|
+
workItem: z.object({
|
|
211
|
+
id: z.string(),
|
|
212
|
+
key: z.string().nullable(),
|
|
213
|
+
title: z.string(),
|
|
214
|
+
board: z.string().nullable(),
|
|
215
|
+
phase: z.string().nullable()
|
|
216
|
+
}).nullable()
|
|
217
|
+
});
|
|
218
|
+
const runQueueResponseSchema = z.object({
|
|
219
|
+
/** This server process's run slots; `null` when it runs no dispatcher. Other servers keep their own. */
|
|
220
|
+
slots: z.object({
|
|
221
|
+
scope: z.literal("server"),
|
|
222
|
+
inUse: z.number().int(),
|
|
223
|
+
cap: z.number().int()
|
|
224
|
+
}).nullable(),
|
|
225
|
+
/** The project's runs holding a slot on any server. */
|
|
226
|
+
running: z.number().int(),
|
|
227
|
+
claimed: z.array(runQueueEntrySchema),
|
|
228
|
+
/** Every waiting run, though `queued` lists at most the oldest 50. */
|
|
229
|
+
queuedCount: z.number().int(),
|
|
230
|
+
queued: z.array(runQueueEntrySchema.extend({ position: z.number().int().positive() }))
|
|
231
|
+
});
|
|
196
232
|
const createProjectBodySchema = z.object({
|
|
197
233
|
name: nonEmptyTrimmed(200),
|
|
198
234
|
description: nullableTrimmed(2e3).optional().default(null),
|
|
@@ -1198,6 +1234,13 @@ const FACTORY_ROUTE_CONTRACTS = {
|
|
|
1198
1234
|
nextCursor: z.string().optional()
|
|
1199
1235
|
})
|
|
1200
1236
|
},
|
|
1237
|
+
runQueue: {
|
|
1238
|
+
method: "GET",
|
|
1239
|
+
path: "/web/factory/projects/:id/run-queue",
|
|
1240
|
+
description: "List the project's automated runs waiting for a run slot, oldest first, and the runs holding one. The cap is per server process; manual starts are claimed ahead of this queue.",
|
|
1241
|
+
pathSchema: projectPathSchema,
|
|
1242
|
+
responseSchema: runQueueResponseSchema
|
|
1243
|
+
},
|
|
1201
1244
|
decisionApprove: {
|
|
1202
1245
|
method: "POST",
|
|
1203
1246
|
path: "/web/factory/projects/:id/decisions/:decisionId/approve",
|
|
@@ -1299,6 +1342,6 @@ const FACTORY_ROUTE_CONTRACTS = {
|
|
|
1299
1342
|
responseSchema: skillResponseSchema
|
|
1300
1343
|
}
|
|
1301
1344
|
};
|
|
1302
|
-
export { BOARD_PHASES_SORTS, FACTORY_ROUTE_CONTRACTS, MAX_SANDBOX_ENV_VALUE_LENGTH, MAX_SKILL_OVERRIDE_LENGTH, RESERVED_SANDBOX_ENV_NAMES, THINKING_LEVELS, UUID_PATTERN, attentionQuerySchema, automationRunStartBodySchema, boardDeleteQuerySchema, boardPhasesQuerySchema, boardPhasesResponseSchema, boardResetBodySchema, createProjectBodySchema, createWorkItemBodySchema, decisionQuerySchema, environmentBuildResponseSchema, environmentBuildSchema, environmentBuildStartResponseSchema, environmentBuildTriggersSchema, environmentBuildsResponseSchema, environmentLastBuildSchema, environmentSandboxSchema, intakeRouteInputSchema, intakeRoutePatchSchema, intakeRouteReorderBodySchema, metricsQuerySchema, projectEnvironmentResponseSchema, projectListRepositorySchema, replaceBoardBodySchema, sandboxEnvAppliesToSchema, sandboxEnvNameSchema, sandboxEnvSetBodySchema, sandboxEnvUpdateBodySchema, skillOverrideBodySchema, skillOverrideSaveRequestSchema, startWorkItemBodySchema, transitionBodySchema, updateProjectBodySchema, updateProjectEnvironmentBodySchema, updateWorkItemBodySchema, workItemActivityQuerySchema, workItemActivityResponseSchema, workItemFilterOptionsResponseSchema, workItemStartersResponseSchema };
|
|
1345
|
+
export { BOARD_PHASES_SORTS, FACTORY_ROUTE_CONTRACTS, MAX_SANDBOX_ENV_VALUE_LENGTH, MAX_SKILL_OVERRIDE_LENGTH, RESERVED_SANDBOX_ENV_NAMES, THINKING_LEVELS, UUID_PATTERN, attentionQuerySchema, automationRunStartBodySchema, boardDeleteQuerySchema, boardPhasesQuerySchema, boardPhasesResponseSchema, boardResetBodySchema, createProjectBodySchema, createWorkItemBodySchema, decisionQuerySchema, environmentBuildResponseSchema, environmentBuildSchema, environmentBuildStartResponseSchema, environmentBuildTriggersSchema, environmentBuildsResponseSchema, environmentLastBuildSchema, environmentSandboxSchema, intakeRouteInputSchema, intakeRoutePatchSchema, intakeRouteReorderBodySchema, metricsQuerySchema, projectEnvironmentResponseSchema, projectListRepositorySchema, replaceBoardBodySchema, runQueueResponseSchema, sandboxEnvAppliesToSchema, sandboxEnvNameSchema, sandboxEnvSetBodySchema, sandboxEnvUpdateBodySchema, skillOverrideBodySchema, skillOverrideSaveRequestSchema, startWorkItemBodySchema, transitionBodySchema, updateProjectBodySchema, updateProjectEnvironmentBodySchema, updateWorkItemBodySchema, workItemActivityQuerySchema, workItemActivityResponseSchema, workItemFilterOptionsResponseSchema, workItemStartersResponseSchema };
|
|
1303
1346
|
|
|
1304
1347
|
//# sourceMappingURL=contracts.js.map
|