@primero.ai/temporal-graph-tools 1.2.1 → 1.4.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 (60) hide show
  1. package/dist/examples/mastra-ai-workflow/activities/classify-outage-with-ai.d.ts +1 -1
  2. package/dist/examples/mastra-ai-workflow/activities/classify-outage-with-ai.d.ts.map +1 -1
  3. package/dist/examples/mastra-ai-workflow/activities/classify-outage-with-ai.js +14 -29
  4. package/dist/examples/mastra-ai-workflow/activities/draft-response-with-ai.d.ts +1 -1
  5. package/dist/examples/mastra-ai-workflow/activities/draft-response-with-ai.d.ts.map +1 -1
  6. package/dist/examples/mastra-ai-workflow/activities/draft-response-with-ai.js +6 -23
  7. package/dist/examples/mastra-ai-workflow/activities/enrich-outage-description.d.ts +1 -1
  8. package/dist/examples/mastra-ai-workflow/activities/enrich-outage-description.d.ts.map +1 -1
  9. package/dist/examples/mastra-ai-workflow/activities/enrich-outage-description.js +2 -13
  10. package/dist/examples/mastra-ai-workflow/activities/index.d.ts +2 -2
  11. package/dist/examples/mastra-ai-workflow/activities/index.d.ts.map +1 -1
  12. package/dist/examples/mastra-ai-workflow/activities/submit-response.d.ts +1 -1
  13. package/dist/examples/mastra-ai-workflow/activities/submit-response.d.ts.map +1 -1
  14. package/dist/examples/mastra-ai-workflow/activities/submit-response.js +5 -14
  15. package/dist/examples/mastra-ai-workflow/activities/take-ticket.d.ts +1 -1
  16. package/dist/examples/mastra-ai-workflow/activities/take-ticket.d.ts.map +1 -1
  17. package/dist/examples/mastra-ai-workflow/activities/take-ticket.js +6 -15
  18. package/dist/examples/mastra-ai-workflow/workflow.d.ts +3 -0
  19. package/dist/examples/mastra-ai-workflow/workflow.d.ts.map +1 -0
  20. package/dist/examples/mastra-ai-workflow/workflow.js +95 -0
  21. package/dist/examples/trigger-mastra-workflow.js +11 -16
  22. package/dist/examples/worker.d.ts.map +1 -1
  23. package/dist/examples/worker.js +25 -16
  24. package/dist/src/bundler.d.ts +9 -2
  25. package/dist/src/bundler.d.ts.map +1 -1
  26. package/dist/src/bundler.js +82 -6
  27. package/dist/src/index.d.ts +3 -0
  28. package/dist/src/index.d.ts.map +1 -1
  29. package/dist/src/index.js +3 -0
  30. package/dist/src/mastra/agent-wrapper.d.ts +2 -2
  31. package/dist/src/mastra/agent-wrapper.d.ts.map +1 -1
  32. package/dist/src/mastra/agent-wrapper.js +1 -1
  33. package/dist/src/mastra/ai-model.d.ts +16 -0
  34. package/dist/src/mastra/ai-model.d.ts.map +1 -0
  35. package/dist/src/mastra/ai-model.js +69 -0
  36. package/dist/src/mastra/create-activity-with-mastra.d.ts +1 -0
  37. package/dist/src/mastra/create-activity-with-mastra.d.ts.map +1 -1
  38. package/dist/src/mastra/create-activity-with-mastra.js +8 -6
  39. package/dist/src/mastra/with-mastra-agent.d.ts +12 -0
  40. package/dist/src/mastra/with-mastra-agent.d.ts.map +1 -0
  41. package/dist/src/mastra/with-mastra-agent.js +4 -0
  42. package/dist/src/mastra/workflow-compiler.d.ts +23 -0
  43. package/dist/src/mastra/workflow-compiler.d.ts.map +1 -0
  44. package/dist/src/mastra/workflow-compiler.js +132 -0
  45. package/package.json +6 -2
  46. package/dist/examples/mastra-ai-workflow/workflows.d.ts +0 -2
  47. package/dist/examples/mastra-ai-workflow/workflows.d.ts.map +0 -1
  48. package/dist/examples/mastra-ai-workflow/workflows.js +0 -11
  49. package/dist/examples/mastra-example.d.ts +0 -2
  50. package/dist/examples/mastra-example.d.ts.map +0 -1
  51. package/dist/examples/mastra-example.js +0 -103
  52. package/dist/examples/normal-workflow/activities.d.ts +0 -34
  53. package/dist/examples/normal-workflow/activities.d.ts.map +0 -1
  54. package/dist/examples/normal-workflow/activities.js +0 -38
  55. package/dist/examples/normal-workflow/workflows.d.ts +0 -3
  56. package/dist/examples/normal-workflow/workflows.d.ts.map +0 -1
  57. package/dist/examples/normal-workflow/workflows.js +0 -14
  58. package/dist/examples/trigger-normal-workflow.d.ts +0 -2
  59. package/dist/examples/trigger-normal-workflow.d.ts.map +0 -1
  60. package/dist/examples/trigger-normal-workflow.js +0 -43
@@ -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;AA0FD,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":"AAMA,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;AAiED,eAAO,MAAM,oBAAoB,2FA0DhC,CAAA"}
@@ -1,14 +1,5 @@
1
- var _a;
2
- import { openai } from '@ai-sdk/openai';
3
1
  import { z } from 'zod';
4
- import { createActivityWithMastra, } from '@primero.ai/temporal-graph-tools';
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
- }
2
+ import { resolveAiSelection, selectAiModel, wrapActivityWithMastraAgent, } from '@primero.ai/temporal-graph-tools';
12
3
  function inferIntent(message) {
13
4
  const normalized = message.toLowerCase();
14
5
  if (normalized.includes('invoice') ||
@@ -47,16 +38,18 @@ function inferRootCause(message) {
47
38
  }
48
39
  return 'unknown';
49
40
  }
50
- const modelId = (_a = process.env.MASTRA_AI_MODEL) !== null && _a !== void 0 ? _a : 'gpt-4o-mini';
51
41
  const classificationOutputSchema = z.object({
52
42
  intent: z.enum(['connectivity', 'billing', 'account']),
53
43
  urgency: z.enum(['low', 'medium', 'high']),
54
44
  summary: z.string(),
55
45
  recommendedFix: z.string(),
56
46
  });
57
- const classificationAgentContext = {};
58
- const classificationMastraInput = {
59
- agentInput: {
47
+ export const classifyOutageWithAi = wrapActivityWithMastraAgent(async ({ input: ticket, agent }) => {
48
+ const aiSelection = resolveAiSelection({
49
+ defaultModel: 'gpt-4o-mini',
50
+ defaultProvider: 'openai',
51
+ });
52
+ const classificationAgentInput = {
60
53
  id: 'mastra-outage-classifier',
61
54
  name: 'Mastra Outage Classifier',
62
55
  instructions: [
@@ -64,17 +57,8 @@ const classificationMastraInput = {
64
57
  'If the outage seems local-network and no provider outage is reported, recommend restarting the router.',
65
58
  'Return concise and operational output.',
66
59
  ].join(' '),
67
- model: openai(modelId),
68
- },
69
- agentContext: classificationAgentContext,
70
- };
71
- export const classifyOutageWithAi = createActivityWithMastra({
72
- id: 'classifyOutageWithAi',
73
- onMastraContext: logMastraContext,
74
- mastraInput: classificationMastraInput,
75
- }, async ({ input: ticket, agent }) => {
76
- var _a;
77
- const provider = (_a = process.env.MASTRA_AI_PROVIDER) !== null && _a !== void 0 ? _a : 'openai';
60
+ model: selectAiModel(aiSelection),
61
+ };
78
62
  const fallbackIntent = inferIntent(ticket.outageDescription);
79
63
  const fallbackUrgency = inferUrgency(ticket.outageDescription);
80
64
  const fallbackSummary = ticket.outageDescription.slice(0, 180);
@@ -84,6 +68,7 @@ export const classifyOutageWithAi = createActivityWithMastra({
84
68
  : 'Collect diagnostics and continue support triage.';
85
69
  try {
86
70
  const parsed = await agent({
71
+ agentInput: classificationAgentInput,
87
72
  prompt: [
88
73
  `Ticket ID: ${ticket.ticketId}`,
89
74
  `Client: ${ticket.client.name} (${ticket.client.accountId}) at ${ticket.client.site}`,
@@ -93,8 +78,8 @@ export const classifyOutageWithAi = createActivityWithMastra({
93
78
  schema: classificationOutputSchema,
94
79
  });
95
80
  return {
96
- provider,
97
- model: modelId,
81
+ provider: aiSelection.provider,
82
+ model: aiSelection.model,
98
83
  intent: parsed.intent,
99
84
  urgency: parsed.urgency,
100
85
  summary: parsed.summary,
@@ -105,8 +90,8 @@ export const classifyOutageWithAi = createActivityWithMastra({
105
90
  console.warn('[mastra-ai] classifyOutageWithAi fallback:', error);
106
91
  }
107
92
  return {
108
- provider,
109
- model: modelId,
93
+ provider: aiSelection.provider,
94
+ model: aiSelection.model,
110
95
  intent: fallbackIntent,
111
96
  urgency: fallbackUrgency,
112
97
  summary: fallbackSummary,
@@ -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":"AAEA,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;AAOD,eAAO,MAAM,mBAAmB,4FAiD/B,CAAA"}
@@ -1,37 +1,19 @@
1
- var _a;
2
- import { openai } from '@ai-sdk/openai';
3
1
  import { z } from 'zod';
4
- import { createActivityWithMastra, } from '@primero.ai/temporal-graph-tools';
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
- }
12
- const modelId = (_a = process.env.MASTRA_AI_MODEL) !== null && _a !== void 0 ? _a : 'gpt-4o-mini';
2
+ import { selectAiModel, wrapActivityWithMastraAgent } from '@primero.ai/temporal-graph-tools';
13
3
  const responseOutputSchema = z.object({
14
4
  subject: z.string(),
15
5
  body: z.string(),
16
6
  });
17
- const responseAgentContext = {};
18
- const responseMastraInput = {
19
- agentInput: {
7
+ export const draftResponseWithAi = wrapActivityWithMastraAgent(async ({ input: analysis, agent }) => {
8
+ const responseAgentInput = {
20
9
  id: 'mastra-response-writer',
21
10
  name: 'Mastra Response Writer',
22
11
  instructions: [
23
12
  'You write short, professional customer responses for internet incidents.',
24
13
  'If evidence indicates local-network issue without provider outage, explicitly instruct router restart.',
25
14
  ].join(' '),
26
- model: openai(modelId),
27
- },
28
- agentContext: responseAgentContext,
29
- };
30
- export const draftResponseWithAi = createActivityWithMastra({
31
- id: 'draftResponseWithAi',
32
- onMastraContext: logMastraContext,
33
- mastraInput: responseMastraInput,
34
- }, async ({ input: analysis, agent }) => {
15
+ model: selectAiModel({ defaultModel: 'gpt-4o-mini' }),
16
+ };
35
17
  const { classifyOutageWithAi: ai, enrichOutageDescription: enriched } = analysis;
36
18
  const fallbackSubject = `[${ai.intent.toUpperCase()}][${ai.urgency}] Internet Incident`;
37
19
  const fallbackBody = [
@@ -46,6 +28,7 @@ export const draftResponseWithAi = createActivityWithMastra({
46
28
  ].join('\n');
47
29
  try {
48
30
  const parsed = await agent({
31
+ agentInput: responseAgentInput,
49
32
  prompt: [
50
33
  `Client: ${enriched.client.name} (${enriched.client.accountId}) at ${enriched.client.site}`,
51
34
  `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,4HAa1B,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"}