@primero.ai/temporal-graph-tools 1.2.0 → 1.3.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.
Files changed (59) hide show
  1. package/README.md +3 -1
  2. package/dist/examples/mastra-ai-workflow/activities/classify-outage-with-ai.d.ts +1 -1
  3. package/dist/examples/mastra-ai-workflow/activities/classify-outage-with-ai.d.ts.map +1 -1
  4. package/dist/examples/mastra-ai-workflow/activities/classify-outage-with-ai.js +21 -29
  5. package/dist/examples/mastra-ai-workflow/activities/draft-response-with-ai.d.ts +1 -1
  6. package/dist/examples/mastra-ai-workflow/activities/draft-response-with-ai.d.ts.map +1 -1
  7. package/dist/examples/mastra-ai-workflow/activities/draft-response-with-ai.js +11 -25
  8. package/dist/examples/mastra-ai-workflow/activities/enrich-outage-description.d.ts +1 -1
  9. package/dist/examples/mastra-ai-workflow/activities/enrich-outage-description.d.ts.map +1 -1
  10. package/dist/examples/mastra-ai-workflow/activities/enrich-outage-description.js +2 -13
  11. package/dist/examples/mastra-ai-workflow/activities/index.d.ts +2 -2
  12. package/dist/examples/mastra-ai-workflow/activities/index.d.ts.map +1 -1
  13. package/dist/examples/mastra-ai-workflow/activities/submit-response.d.ts +1 -1
  14. package/dist/examples/mastra-ai-workflow/activities/submit-response.d.ts.map +1 -1
  15. package/dist/examples/mastra-ai-workflow/activities/submit-response.js +5 -14
  16. package/dist/examples/mastra-ai-workflow/activities/take-ticket.d.ts +1 -1
  17. package/dist/examples/mastra-ai-workflow/activities/take-ticket.d.ts.map +1 -1
  18. package/dist/examples/mastra-ai-workflow/activities/take-ticket.js +6 -15
  19. package/dist/examples/mastra-ai-workflow/workflow.d.ts +3 -0
  20. package/dist/examples/mastra-ai-workflow/workflow.d.ts.map +1 -0
  21. package/dist/examples/mastra-ai-workflow/workflow.js +95 -0
  22. package/dist/examples/trigger-mastra-workflow.js +11 -16
  23. package/dist/examples/worker.d.ts.map +1 -1
  24. package/dist/examples/worker.js +25 -16
  25. package/dist/src/bundler.d.ts +9 -2
  26. package/dist/src/bundler.d.ts.map +1 -1
  27. package/dist/src/bundler.js +84 -8
  28. package/dist/src/index.d.ts +2 -0
  29. package/dist/src/index.d.ts.map +1 -1
  30. package/dist/src/index.js +2 -0
  31. package/dist/src/mastra/agent-wrapper.d.ts +2 -2
  32. package/dist/src/mastra/agent-wrapper.d.ts.map +1 -1
  33. package/dist/src/mastra/agent-wrapper.js +1 -1
  34. package/dist/src/mastra/create-activity-with-mastra.d.ts +1 -0
  35. package/dist/src/mastra/create-activity-with-mastra.d.ts.map +1 -1
  36. package/dist/src/mastra/create-activity-with-mastra.js +11 -7
  37. package/dist/src/mastra/with-mastra-agent.d.ts +12 -0
  38. package/dist/src/mastra/with-mastra-agent.d.ts.map +1 -0
  39. package/dist/src/mastra/with-mastra-agent.js +4 -0
  40. package/dist/src/mastra/workflow-compiler.d.ts +23 -0
  41. package/dist/src/mastra/workflow-compiler.d.ts.map +1 -0
  42. package/dist/src/mastra/workflow-compiler.js +132 -0
  43. package/dist/src/workflow/collection.d.ts.map +1 -1
  44. package/package.json +17 -18
  45. package/dist/examples/mastra-ai-workflow/workflows.d.ts +0 -2
  46. package/dist/examples/mastra-ai-workflow/workflows.d.ts.map +0 -1
  47. package/dist/examples/mastra-ai-workflow/workflows.js +0 -11
  48. package/dist/examples/mastra-example.d.ts +0 -2
  49. package/dist/examples/mastra-example.d.ts.map +0 -1
  50. package/dist/examples/mastra-example.js +0 -103
  51. package/dist/examples/normal-workflow/activities.d.ts +0 -34
  52. package/dist/examples/normal-workflow/activities.d.ts.map +0 -1
  53. package/dist/examples/normal-workflow/activities.js +0 -38
  54. package/dist/examples/normal-workflow/workflows.d.ts +0 -3
  55. package/dist/examples/normal-workflow/workflows.d.ts.map +0 -1
  56. package/dist/examples/normal-workflow/workflows.js +0 -14
  57. package/dist/examples/trigger-normal-workflow.d.ts +0 -2
  58. package/dist/examples/trigger-normal-workflow.d.ts.map +0 -1
  59. package/dist/examples/trigger-normal-workflow.js +0 -43
package/README.md CHANGED
@@ -49,7 +49,9 @@ const fetchUserProfile = createActivity(
49
49
  return { profile: { id: userId, name: `User ${userId}` } }
50
50
  },
51
51
  async ({ context, execute }) => {
52
- console.log(`[mastra] node=${context?.node.key} stage=${context?.node.stageIndex}`)
52
+ console.log(
53
+ `[mastra] node=${context?.node.key} stage=${context?.node.stageIndex}`,
54
+ )
53
55
  return execute()
54
56
  },
55
57
  ),
@@ -9,5 +9,5 @@ export type AiClassification = {
9
9
  summary: string;
10
10
  recommendedFix: string;
11
11
  };
12
- export declare const classifyOutageWithAi: import("@primero.ai/temporal-graph-tools").ConfiguredActivityReference<TicketIntake, AiClassification, "classifyOutageWithAi">;
12
+ export declare const classifyOutageWithAi: import("@primero.ai/temporal-graph-tools").CreateActivity<TicketIntake, AiClassification>;
13
13
  //# sourceMappingURL=classify-outage-with-ai.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classify-outage-with-ai.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/classify-outage-with-ai.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAAA;AACjE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;AAErD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,EAAE,aAAa,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AA8ED,eAAO,MAAM,oBAAoB,gIAqDhC,CAAA"}
1
+ {"version":3,"file":"classify-outage-with-ai.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/classify-outage-with-ai.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAAA;AACjE,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;AAErD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,EAAE,aAAa,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AA4ED,eAAO,MAAM,oBAAoB,2FA6ChC,CAAA"}
@@ -1,27 +1,26 @@
1
1
  var _a;
2
- import { createActivityWithMastra, } from '@primero.ai/temporal-graph-tools';
3
2
  import { openai } from '@ai-sdk/openai';
4
3
  import { z } from 'zod';
5
- function logMastraContext(context) {
6
- var _a, _b, _c, _d, _e;
7
- if (!(context === null || context === void 0 ? void 0 : context.node)) {
8
- return;
9
- }
10
- console.log(`[mastra-ai] node=${(_a = context.node.key) !== null && _a !== void 0 ? _a : 'unknown'} stage=${(_b = context.node.stageIndex) !== null && _b !== void 0 ? _b : -1} type=${(_c = context.node.stageType) !== null && _c !== void 0 ? _c : 'unknown'} previous=${(_e = (_d = context.previousNode) === null || _d === void 0 ? void 0 : _d.key) !== null && _e !== void 0 ? _e : 'none'}`);
11
- }
4
+ import { wrapActivityWithMastraAgent } from '@primero.ai/temporal-graph-tools';
12
5
  function inferIntent(message) {
13
6
  const normalized = message.toLowerCase();
14
- if (normalized.includes('invoice') || normalized.includes('refund') || normalized.includes('charge')) {
7
+ if (normalized.includes('invoice') ||
8
+ normalized.includes('refund') ||
9
+ normalized.includes('charge')) {
15
10
  return 'billing';
16
11
  }
17
- if (normalized.includes('password') || normalized.includes('login') || normalized.includes('2fa')) {
12
+ if (normalized.includes('password') ||
13
+ normalized.includes('login') ||
14
+ normalized.includes('2fa')) {
18
15
  return 'account';
19
16
  }
20
17
  return 'connectivity';
21
18
  }
22
19
  function inferUrgency(message) {
23
20
  const normalized = message.toLowerCase();
24
- if (normalized.includes('urgent') || normalized.includes('down') || normalized.includes('cannot work')) {
21
+ if (normalized.includes('urgent') ||
22
+ normalized.includes('down') ||
23
+ normalized.includes('cannot work')) {
25
24
  return 'high';
26
25
  }
27
26
  if (normalized.includes('soon') || normalized.includes('today')) {
@@ -48,25 +47,17 @@ const classificationOutputSchema = z.object({
48
47
  summary: z.string(),
49
48
  recommendedFix: z.string(),
50
49
  });
51
- const classificationAgentContext = {};
52
- const classificationMastraInput = {
53
- agentInput: {
54
- id: 'mastra-outage-classifier',
55
- name: 'Mastra Outage Classifier',
56
- instructions: [
57
- 'You classify support tickets and propose precise remediation.',
58
- 'If the outage seems local-network and no provider outage is reported, recommend restarting the router.',
59
- 'Return concise and operational output.',
60
- ].join(' '),
61
- model: openai(modelId),
62
- },
63
- agentContext: classificationAgentContext,
50
+ const classificationAgentInput = {
51
+ id: 'mastra-outage-classifier',
52
+ name: 'Mastra Outage Classifier',
53
+ instructions: [
54
+ 'You classify support tickets and propose precise remediation.',
55
+ 'If the outage seems local-network and no provider outage is reported, recommend restarting the router.',
56
+ 'Return concise and operational output.',
57
+ ].join(' '),
58
+ model: openai(modelId),
64
59
  };
65
- export const classifyOutageWithAi = createActivityWithMastra({
66
- id: 'classifyOutageWithAi',
67
- onMastraContext: logMastraContext,
68
- mastraInput: classificationMastraInput,
69
- }, async ({ input: ticket, agent }) => {
60
+ export const classifyOutageWithAi = wrapActivityWithMastraAgent(async ({ input: ticket, agent }) => {
70
61
  var _a;
71
62
  const provider = (_a = process.env.MASTRA_AI_PROVIDER) !== null && _a !== void 0 ? _a : 'openai';
72
63
  const fallbackIntent = inferIntent(ticket.outageDescription);
@@ -78,6 +69,7 @@ export const classifyOutageWithAi = createActivityWithMastra({
78
69
  : 'Collect diagnostics and continue support triage.';
79
70
  try {
80
71
  const parsed = await agent({
72
+ agentInput: classificationAgentInput,
81
73
  prompt: [
82
74
  `Ticket ID: ${ticket.ticketId}`,
83
75
  `Client: ${ticket.client.name} (${ticket.client.accountId}) at ${ticket.client.site}`,
@@ -8,5 +8,5 @@ export type DraftResponse = {
8
8
  subject: string;
9
9
  body: string;
10
10
  };
11
- export declare const draftResponseWithAi: import("@primero.ai/temporal-graph-tools").ConfiguredActivityReference<ParallelAnalysis, DraftResponse, "draftResponseWithAi">;
11
+ export declare const draftResponseWithAi: import("@primero.ai/temporal-graph-tools").CreateActivity<ParallelAnalysis, DraftResponse>;
12
12
  //# sourceMappingURL=draft-response-with-ai.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"draft-response-with-ai.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/draft-response-with-ai.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oBAAoB,EAAE,gBAAgB,CAAA;IACtC,uBAAuB,EAAE,mBAAmB,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AA+BD,eAAO,MAAM,mBAAmB,gIAgD/B,CAAA"}
1
+ {"version":3,"file":"draft-response-with-ai.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/draft-response-with-ai.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oBAAoB,EAAE,gBAAgB,CAAA;IACtC,uBAAuB,EAAE,mBAAmB,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAiBD,eAAO,MAAM,mBAAmB,4FAwC/B,CAAA"}
@@ -1,37 +1,22 @@
1
1
  var _a;
2
- import { createActivityWithMastra, } from '@primero.ai/temporal-graph-tools';
3
2
  import { openai } from '@ai-sdk/openai';
4
3
  import { z } from 'zod';
5
- function logMastraContext(context) {
6
- var _a, _b, _c, _d, _e;
7
- if (!(context === null || context === void 0 ? void 0 : context.node)) {
8
- return;
9
- }
10
- console.log(`[mastra-ai] node=${(_a = context.node.key) !== null && _a !== void 0 ? _a : 'unknown'} stage=${(_b = context.node.stageIndex) !== null && _b !== void 0 ? _b : -1} type=${(_c = context.node.stageType) !== null && _c !== void 0 ? _c : 'unknown'} previous=${(_e = (_d = context.previousNode) === null || _d === void 0 ? void 0 : _d.key) !== null && _e !== void 0 ? _e : 'none'}`);
11
- }
4
+ import { wrapActivityWithMastraAgent } from '@primero.ai/temporal-graph-tools';
12
5
  const modelId = (_a = process.env.MASTRA_AI_MODEL) !== null && _a !== void 0 ? _a : 'gpt-4o-mini';
13
6
  const responseOutputSchema = z.object({
14
7
  subject: z.string(),
15
8
  body: z.string(),
16
9
  });
17
- const responseAgentContext = {};
18
- const responseMastraInput = {
19
- agentInput: {
20
- id: 'mastra-response-writer',
21
- name: 'Mastra Response Writer',
22
- instructions: [
23
- 'You write short, professional customer responses for internet incidents.',
24
- 'If evidence indicates local-network issue without provider outage, explicitly instruct router restart.',
25
- ].join(' '),
26
- model: openai(modelId),
27
- },
28
- agentContext: responseAgentContext,
10
+ const responseAgentInput = {
11
+ id: 'mastra-response-writer',
12
+ name: 'Mastra Response Writer',
13
+ instructions: [
14
+ 'You write short, professional customer responses for internet incidents.',
15
+ 'If evidence indicates local-network issue without provider outage, explicitly instruct router restart.',
16
+ ].join(' '),
17
+ model: openai(modelId),
29
18
  };
30
- export const draftResponseWithAi = createActivityWithMastra({
31
- id: 'draftResponseWithAi',
32
- onMastraContext: logMastraContext,
33
- mastraInput: responseMastraInput,
34
- }, async ({ input: analysis, agent }) => {
19
+ export const draftResponseWithAi = wrapActivityWithMastraAgent(async ({ input: analysis, agent }) => {
35
20
  const { classifyOutageWithAi: ai, enrichOutageDescription: enriched } = analysis;
36
21
  const fallbackSubject = `[${ai.intent.toUpperCase()}][${ai.urgency}] Internet Incident`;
37
22
  const fallbackBody = [
@@ -46,6 +31,7 @@ export const draftResponseWithAi = createActivityWithMastra({
46
31
  ].join('\n');
47
32
  try {
48
33
  const parsed = await agent({
34
+ agentInput: responseAgentInput,
49
35
  prompt: [
50
36
  `Client: ${enriched.client.name} (${enriched.client.accountId}) at ${enriched.client.site}`,
51
37
  `Classification Intent: ${ai.intent}`,
@@ -4,5 +4,5 @@ export type EnrichedDescription = {
4
4
  rewrittenDescription: string;
5
5
  inferredRootCause: 'local-network' | 'provider-outage' | 'unknown';
6
6
  };
7
- export declare const enrichOutageDescription: import("@primero.ai/temporal-graph-tools").ConfiguredActivityReference<TicketIntake, EnrichedDescription, "enrichOutageDescription">;
7
+ export declare function enrichOutageDescription(ticket: TicketIntake): Promise<EnrichedDescription>;
8
8
  //# sourceMappingURL=enrich-outage-description.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"enrich-outage-description.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/enrich-outage-description.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iBAAiB,EAAE,eAAe,GAAG,iBAAiB,GAAG,SAAS,CAAA;CACnE,CAAA;AA4BD,eAAO,MAAM,uBAAuB,sIAwBnC,CAAA"}
1
+ {"version":3,"file":"enrich-outage-description.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/enrich-outage-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,iBAAiB,EAAE,eAAe,GAAG,iBAAiB,GAAG,SAAS,CAAA;CACnE,CAAA;AAkBD,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAchG"}
@@ -1,11 +1,3 @@
1
- import { createActivityWithMastra } from '@primero.ai/temporal-graph-tools';
2
- function logMastraContext(context) {
3
- var _a, _b, _c, _d, _e;
4
- if (!(context === null || context === void 0 ? void 0 : context.node)) {
5
- return;
6
- }
7
- console.log(`[mastra-ai] node=${(_a = context.node.key) !== null && _a !== void 0 ? _a : 'unknown'} stage=${(_b = context.node.stageIndex) !== null && _b !== void 0 ? _b : -1} type=${(_c = context.node.stageType) !== null && _c !== void 0 ? _c : 'unknown'} previous=${(_e = (_d = context.previousNode) === null || _d === void 0 ? void 0 : _d.key) !== null && _e !== void 0 ? _e : 'none'}`);
8
- }
9
1
  function inferRootCause(message) {
10
2
  const normalized = message.toLowerCase();
11
3
  const providerOutage = /provider outage|isp outage|service outage/.test(normalized);
@@ -18,10 +10,7 @@ function inferRootCause(message) {
18
10
  }
19
11
  return 'unknown';
20
12
  }
21
- export const enrichOutageDescription = createActivityWithMastra({
22
- id: 'enrichOutageDescription',
23
- onMastraContext: logMastraContext,
24
- }, async ({ input: ticket }) => {
13
+ export async function enrichOutageDescription(ticket) {
25
14
  const rootCause = inferRootCause(ticket.outageDescription);
26
15
  const rewrittenDescription = [
27
16
  `Client ${ticket.client.name} (${ticket.client.accountId}) at ${ticket.client.site} reports internet connectivity failure.`,
@@ -34,4 +23,4 @@ export const enrichOutageDescription = createActivityWithMastra({
34
23
  rewrittenDescription,
35
24
  inferredRootCause: rootCause,
36
25
  };
37
- });
26
+ }
@@ -3,8 +3,8 @@ export { draftResponseWithAi } from './draft-response-with-ai';
3
3
  export { enrichOutageDescription } from './enrich-outage-description';
4
4
  export { submitResponse } from './submit-response';
5
5
  export { takeTicket } from './take-ticket';
6
- export type { AiClassification, TicketIntent, TicketUrgency } from './classify-outage-with-ai';
7
- export type { DraftResponse, ParallelAnalysis } from './draft-response-with-ai';
6
+ export type { AiClassification } from './classify-outage-with-ai';
7
+ export type { DraftResponse } from './draft-response-with-ai';
8
8
  export type { EnrichedDescription } from './enrich-outage-description';
9
9
  export type { SubmittedResponse } from './submit-response';
10
10
  export type { SupportTicketInput, TicketIntake } from './take-ticket';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9F,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC/E,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AACjE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA"}
@@ -3,5 +3,5 @@ export type SubmittedResponse = {
3
3
  ready: true;
4
4
  response: DraftResponse;
5
5
  };
6
- export declare const submitResponse: import("@primero.ai/temporal-graph-tools").ConfiguredActivityReference<DraftResponse, SubmittedResponse, "submitResponse">;
6
+ export declare function submitResponse(draft: DraftResponse): Promise<SubmittedResponse>;
7
7
  //# sourceMappingURL=submit-response.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"submit-response.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/submit-response.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,IAAI,CAAA;IACX,QAAQ,EAAE,aAAa,CAAA;CACxB,CAAA;AAYD,eAAO,MAAM,cAAc,4HAS1B,CAAA"}
1
+ {"version":3,"file":"submit-response.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/submit-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAE7D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,IAAI,CAAA;IACX,QAAQ,EAAE,aAAa,CAAA;CACxB,CAAA;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAKrF"}
@@ -1,15 +1,6 @@
1
- import { createActivityWithMastra } from '@primero.ai/temporal-graph-tools';
2
- function logMastraContext(context) {
3
- var _a, _b, _c, _d, _e;
4
- if (!(context === null || context === void 0 ? void 0 : context.node)) {
5
- return;
6
- }
7
- console.log(`[mastra-ai] node=${(_a = context.node.key) !== null && _a !== void 0 ? _a : 'unknown'} stage=${(_b = context.node.stageIndex) !== null && _b !== void 0 ? _b : -1} type=${(_c = context.node.stageType) !== null && _c !== void 0 ? _c : 'unknown'} previous=${(_e = (_d = context.previousNode) === null || _d === void 0 ? void 0 : _d.key) !== null && _e !== void 0 ? _e : 'none'}`);
1
+ export async function submitResponse(draft) {
2
+ return {
3
+ ready: true,
4
+ response: draft,
5
+ };
8
6
  }
9
- export const submitResponse = createActivityWithMastra({
10
- id: 'submitResponse',
11
- onMastraContext: logMastraContext,
12
- }, async ({ input: draft }) => ({
13
- ready: true,
14
- response: draft,
15
- }));
@@ -12,5 +12,5 @@ export type TicketIntake = {
12
12
  client: SupportTicketInput['client'];
13
13
  outageDescription: string;
14
14
  };
15
- export declare const takeTicket: import("@primero.ai/temporal-graph-tools").ConfiguredActivityReference<SupportTicketInput, TicketIntake, "takeTicket">;
15
+ export declare function takeTicket(input: SupportTicketInput): Promise<TicketIntake>;
16
16
  //# sourceMappingURL=take-ticket.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"take-ticket.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/take-ticket.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,MAAM,CAAA;QACjB,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACpC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAYD,eAAO,MAAM,UAAU,wHAUtB,CAAA"}
1
+ {"version":3,"file":"take-ticket.d.ts","sourceRoot":"","sources":["../../../../examples/mastra-ai-workflow/activities/take-ticket.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,EAAE,MAAM,CAAA;QACjB,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACpC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,wBAAsB,UAAU,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAMjF"}
@@ -1,16 +1,7 @@
1
- import { createActivityWithMastra } from '@primero.ai/temporal-graph-tools';
2
- function logMastraContext(context) {
3
- var _a, _b, _c, _d, _e;
4
- if (!(context === null || context === void 0 ? void 0 : context.node)) {
5
- return;
6
- }
7
- console.log(`[mastra-ai] node=${(_a = context.node.key) !== null && _a !== void 0 ? _a : 'unknown'} stage=${(_b = context.node.stageIndex) !== null && _b !== void 0 ? _b : -1} type=${(_c = context.node.stageType) !== null && _c !== void 0 ? _c : 'unknown'} previous=${(_e = (_d = context.previousNode) === null || _d === void 0 ? void 0 : _d.key) !== null && _e !== void 0 ? _e : 'none'}`);
1
+ export async function takeTicket(input) {
2
+ return {
3
+ ticketId: input.ticketId,
4
+ client: input.client,
5
+ outageDescription: input.outageDescription.trim(),
6
+ };
8
7
  }
9
- export const takeTicket = createActivityWithMastra({
10
- id: 'takeTicket',
11
- onMastraContext: logMastraContext,
12
- }, async ({ input }) => ({
13
- ticketId: input.ticketId,
14
- client: input.client,
15
- outageDescription: input.outageDescription.trim(),
16
- }));
@@ -0,0 +1,3 @@
1
+ import { type SubmittedResponse, type SupportTicketInput } from './activities';
2
+ export declare const mastraAiSupportWorkflow: import("@mastra/core/workflows").Workflow<import("@mastra/core/workflows").DefaultEngineType, import("@mastra/core/workflows").Step<string, unknown, unknown, unknown, unknown, unknown, any, unknown>[], "mastra-ai-support-orchestration", unknown, SupportTicketInput, SubmittedResponse, SubmittedResponse, unknown>;
3
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../../examples/mastra-ai-workflow/workflow.ts"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAExB,MAAM,cAAc,CAAA;AAgGrB,eAAO,MAAM,uBAAuB,0TASzB,CAAA"}
@@ -0,0 +1,95 @@
1
+ import { createStep, createWorkflow } from '@mastra/core/workflows';
2
+ import { z } from 'zod';
3
+ import { classifyOutageWithAi, draftResponseWithAi, enrichOutageDescription, submitResponse, takeTicket, } from './activities';
4
+ const supportTicketInputSchema = z.object({
5
+ ticketId: z.string(),
6
+ client: z.object({
7
+ name: z.string(),
8
+ accountId: z.string(),
9
+ site: z.string(),
10
+ }),
11
+ outageDescription: z.string(),
12
+ });
13
+ const ticketIntakeSchema = z.object({
14
+ ticketId: z.string(),
15
+ client: z.object({
16
+ name: z.string(),
17
+ accountId: z.string(),
18
+ site: z.string(),
19
+ }),
20
+ outageDescription: z.string(),
21
+ });
22
+ const aiClassificationSchema = z.object({
23
+ provider: z.string(),
24
+ model: z.string(),
25
+ intent: z.enum(['connectivity', 'billing', 'account']),
26
+ urgency: z.enum(['low', 'medium', 'high']),
27
+ summary: z.string(),
28
+ recommendedFix: z.string(),
29
+ });
30
+ const enrichedDescriptionSchema = z.object({
31
+ client: z.object({
32
+ name: z.string(),
33
+ accountId: z.string(),
34
+ site: z.string(),
35
+ }),
36
+ rewrittenDescription: z.string(),
37
+ inferredRootCause: z.enum(['local-network', 'provider-outage', 'unknown']),
38
+ });
39
+ const parallelAnalysisSchema = z.object({
40
+ classifyOutageWithAi: aiClassificationSchema,
41
+ enrichOutageDescription: enrichedDescriptionSchema,
42
+ });
43
+ const draftResponseSchema = z.object({
44
+ subject: z.string(),
45
+ body: z.string(),
46
+ });
47
+ const submittedResponseSchema = z.object({
48
+ ready: z.literal(true),
49
+ response: draftResponseSchema,
50
+ });
51
+ const takeTicketStep = createStep({
52
+ id: 'takeTicket',
53
+ description: 'Normalize and validate incoming support ticket payload.',
54
+ inputSchema: supportTicketInputSchema,
55
+ outputSchema: ticketIntakeSchema,
56
+ execute: async ({ inputData }) => takeTicket(inputData),
57
+ });
58
+ const classifyOutageWithAiStep = createStep({
59
+ id: 'classifyOutageWithAi',
60
+ description: 'Classify outage intent and urgency with AI or fallback heuristics.',
61
+ inputSchema: ticketIntakeSchema,
62
+ outputSchema: aiClassificationSchema,
63
+ execute: async ({ inputData }) => classifyOutageWithAi(inputData),
64
+ });
65
+ const enrichOutageDescriptionStep = createStep({
66
+ id: 'enrichOutageDescription',
67
+ description: 'Enrich outage narrative with inferred root cause context.',
68
+ inputSchema: ticketIntakeSchema,
69
+ outputSchema: enrichedDescriptionSchema,
70
+ execute: async ({ inputData }) => enrichOutageDescription(inputData),
71
+ });
72
+ const draftResponseWithAiStep = createStep({
73
+ id: 'draftResponseWithAi',
74
+ description: 'Draft a client-ready response from the parallel analysis outputs.',
75
+ inputSchema: parallelAnalysisSchema,
76
+ outputSchema: draftResponseSchema,
77
+ execute: async ({ inputData }) => draftResponseWithAi(inputData),
78
+ });
79
+ const submitResponseStep = createStep({
80
+ id: 'submitResponse',
81
+ description: 'Wrap draft response as a final submitted payload.',
82
+ inputSchema: draftResponseSchema,
83
+ outputSchema: submittedResponseSchema,
84
+ execute: async ({ inputData }) => submitResponse(inputData),
85
+ });
86
+ export const mastraAiSupportWorkflow = createWorkflow({
87
+ id: 'mastra-ai-support-orchestration',
88
+ inputSchema: supportTicketInputSchema,
89
+ outputSchema: submittedResponseSchema,
90
+ })
91
+ .then(takeTicketStep)
92
+ .parallel([classifyOutageWithAiStep, enrichOutageDescriptionStep])
93
+ .then(draftResponseWithAiStep)
94
+ .then(submitResponseStep)
95
+ .commit();
@@ -1,21 +1,17 @@
1
- import { Connection, WorkflowClient } from '@temporalio/client';
2
- import { builderMastraAiSupportWorkflow } from './mastra-ai-workflow/workflows';
3
- const DEFAULT_NAMESPACE = 'default';
4
- const DEFAULT_TASK_QUEUE = 'default';
1
+ import { Client, Connection } from '@temporalio/client';
5
2
  async function run() {
6
- var _a, _b, _c;
7
3
  const connection = await Connection.connect({
8
- address: (_a = process.env.TEMPORAL_ADDRESS) !== null && _a !== void 0 ? _a : 'localhost:7233',
9
- tls: process.env.TEMPORAL_API_KEY ? {} : undefined,
4
+ address: process.env.TEMPORAL_ADDRESS,
10
5
  apiKey: process.env.TEMPORAL_API_KEY,
6
+ tls: {},
11
7
  });
12
- const client = new WorkflowClient({
8
+ const client = new Client({
13
9
  connection,
14
- namespace: (_b = process.env.TEMPORAL_NAMESPACE) !== null && _b !== void 0 ? _b : DEFAULT_NAMESPACE,
10
+ namespace: process.env.TEMPORAL_NAMESPACE,
15
11
  });
16
- const handle = await client.start(builderMastraAiSupportWorkflow.workflowName, {
17
- taskQueue: (_c = process.env.TEMPORAL_TASK_QUEUE) !== null && _c !== void 0 ? _c : DEFAULT_TASK_QUEUE,
12
+ const handle = await client.workflow.start('mastraAiSupportWorkflow', {
18
13
  workflowId: `mastra-ai-support-${Date.now()}`,
14
+ taskQueue: process.env.TEMPORAL_TASK_QUEUE || 'default',
19
15
  args: [
20
16
  {
21
17
  ticketId: `ticket-${Date.now()}`,
@@ -28,15 +24,14 @@ async function run() {
28
24
  },
29
25
  ],
30
26
  });
31
- console.log('Mastra AI Workflow started:', {
27
+ const result = await handle.result();
28
+ console.log('Temporal Mastra AI workflow completed:', {
32
29
  workflowId: handle.workflowId,
33
30
  runId: handle.firstExecutionRunId,
31
+ result,
34
32
  });
35
- const result = await handle.result();
36
- console.log('Mastra AI Workflow completed with result:', result);
37
- await connection.close();
38
33
  }
39
34
  run().catch((error) => {
40
- console.error('Failed to run mastra workflow trigger:', error);
35
+ console.error('Failed to trigger Temporal workflow:', error);
41
36
  process.exitCode = 1;
42
37
  });
@@ -1 +1 @@
1
- {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../examples/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,uBAAuB,EAAU,MAAM,oBAAoB,CAAA;AAKtF,wBAAgB,oBAAoB,IAAI,uBAAuB,CAM9D"}
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../examples/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,uBAAuB,EAAU,MAAM,oBAAoB,CAAA;AAStF,wBAAgB,oBAAoB,IAAI,uBAAuB,CAM9D"}
@@ -1,7 +1,7 @@
1
1
  import { NativeConnection, Worker } from '@temporalio/worker';
2
- import { bundleWorkflows, loadActivitiesFromBundle } from '@primero.ai/temporal-graph-tools';
3
- import { builderMastraAiSupportWorkflow } from './mastra-ai-workflow/workflows';
4
- import { builderHelloWorld, builderOnboarding } from './normal-workflow/workflows';
2
+ import { bundleWorkflows, compileMastraWorkflow, loadActivitiesFromBundle, } from '@primero.ai/temporal-graph-tools';
3
+ import * as activities from './mastra-ai-workflow/activities';
4
+ import { mastraAiSupportWorkflow } from './mastra-ai-workflow/workflow';
5
5
  export function getConnectionOptions() {
6
6
  return {
7
7
  address: process.env.TEMPORAL_ADDRESS,
@@ -10,29 +10,38 @@ export function getConnectionOptions() {
10
10
  };
11
11
  }
12
12
  async function run() {
13
- const { workflowBundle, activityBundle } = await bundleWorkflows([builderHelloWorld, builderOnboarding, builderMastraAiSupportWorkflow], {
13
+ var _a;
14
+ const bundleSigningKey = (_a = process.env.TEMPORAL_ACTIVITY_BUNDLE_KEY) === null || _a === void 0 ? void 0 : _a.trim();
15
+ if (!bundleSigningKey) {
16
+ throw new Error('TEMPORAL_ACTIVITY_BUNDLE_KEY is required to sign and verify activity bundles.');
17
+ }
18
+ const compiledMastraWorkflow = compileMastraWorkflow(mastraAiSupportWorkflow, {
19
+ workflowName: 'mastraAiSupportWorkflow',
20
+ stepActivities: {
21
+ takeTicket: activities.takeTicket,
22
+ classifyOutageWithAi: activities.classifyOutageWithAi,
23
+ enrichOutageDescription: activities.enrichOutageDescription,
24
+ draftResponseWithAi: activities.draftResponseWithAi,
25
+ submitResponse: activities.submitResponse,
26
+ },
27
+ proxyOptions: { startToCloseTimeout: '2 minutes' },
28
+ });
29
+ const { workflowBundle, activityBundle } = await bundleWorkflows([compiledMastraWorkflow], {
14
30
  activityBundle: {
15
31
  filename: 'examples.activities.bundle.cjs',
16
- entrypoints: [
17
- './examples/normal-workflow/activities.ts',
18
- './examples/mastra-ai-workflow/activities/index.ts',
19
- ],
32
+ entrypoints: ['./examples/mastra-ai-workflow/activities/index.ts'],
33
+ signingKey: bundleSigningKey,
20
34
  },
21
35
  });
22
- if (!activityBundle.integrity) {
23
- throw new Error('Expected bundleWorkflows() to return an integrity-protected activity bundle.');
24
- }
25
- console.log('Built activity bundle:', {
26
- filename: activityBundle.filename,
27
- integrity: activityBundle.integrity,
36
+ const bundledActivities = await loadActivitiesFromBundle(activityBundle, {
37
+ verificationKey: bundleSigningKey,
28
38
  });
29
- const activities = await loadActivitiesFromBundle(activityBundle);
30
39
  const connection = await NativeConnection.connect(getConnectionOptions());
31
40
  const worker = await Worker.create({
32
41
  connection,
33
42
  namespace: process.env.TEMPORAL_NAMESPACE,
34
43
  taskQueue: process.env.TEMPORAL_TASK_QUEUE || 'default',
35
- activities,
44
+ activities: bundledActivities,
36
45
  workflowBundle,
37
46
  });
38
47
  await worker.run();
@@ -1,9 +1,11 @@
1
+ import { type MastraWorkflowCompilationInput, type MastraWorkflowLike } from './mastra/workflow-compiler.js';
1
2
  import type { WorkflowBuildResult } from './types.js';
2
3
  import type { ActivityImplementations } from './workflow-bundler.js';
3
4
  export type BundleWorkflowsOptions = {
4
5
  filename?: string;
5
6
  activityBundle?: BundleActivitiesOptions;
6
7
  };
8
+ export type BundleWorkflowInput = WorkflowBuildResult | MastraWorkflowLike | MastraWorkflowCompilationInput;
7
9
  export type BundleWorkflowsResult = {
8
10
  activityBundle: BundledActivitiesArtifact;
9
11
  workflowBundle: {
@@ -14,13 +16,18 @@ export type BundleActivitiesOptions = {
14
16
  entrypoints?: readonly string[];
15
17
  filename?: string;
16
18
  externals?: readonly string[];
19
+ signingKey?: string;
17
20
  };
18
21
  export type BundledActivitiesArtifact = {
19
22
  filename: string;
20
23
  code: string;
21
24
  map?: string;
22
25
  integrity?: string;
26
+ signature?: string;
23
27
  };
24
- export declare function loadActivitiesFromBundle(bundle: BundledActivitiesArtifact): Promise<ActivityImplementations>;
25
- export declare function bundleWorkflows(plans: readonly WorkflowBuildResult[], options?: BundleWorkflowsOptions): Promise<BundleWorkflowsResult>;
28
+ export type LoadActivitiesFromBundleOptions = {
29
+ verificationKey?: string;
30
+ };
31
+ export declare function loadActivitiesFromBundle(bundle: BundledActivitiesArtifact, options?: LoadActivitiesFromBundleOptions): Promise<ActivityImplementations>;
32
+ export declare function bundleWorkflows(plans: readonly BundleWorkflowInput[], options?: BundleWorkflowsOptions): Promise<BundleWorkflowsResult>;
26
33
  //# sourceMappingURL=bundler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../src/bundler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAkB,mBAAmB,EAA0B,MAAM,YAAY,CAAA;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAIpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,uBAAuB,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,yBAAyB,CAAA;IACzC,cAAc,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAoCD,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAiDlC;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CAsChC"}
1
+ {"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../src/bundler.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,8BAA8B,EACnC,KAAK,kBAAkB,EACxB,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAkB,mBAAmB,EAA0B,MAAM,YAAY,CAAA;AAC7F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAIpE,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,uBAAuB,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,mBAAmB,GAC3B,mBAAmB,GACnB,kBAAkB,GAClB,8BAA8B,CAAA;AAElC,MAAM,MAAM,qBAAqB,GAAG;IAClC,cAAc,EAAE,yBAAyB,CAAA;IACzC,cAAc,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACjC,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAoCD,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,yBAAyB,EACjC,OAAO,GAAE,+BAAoC,GAC5C,OAAO,CAAC,uBAAuB,CAAC,CAkDlC;AAED,wBAAsB,eAAe,CACnC,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CAuChC"}