@loopstack/meeting-notes-example-workflow 0.20.0 → 0.20.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 +114 -35
- package/dist/documents/meeting-notes-document.d.ts.map +1 -1
- package/dist/documents/meeting-notes-document.js +3 -5
- package/dist/documents/meeting-notes-document.js.map +1 -1
- package/dist/documents/optimized-notes-document.d.ts.map +1 -1
- package/dist/documents/optimized-notes-document.js +3 -5
- package/dist/documents/optimized-notes-document.js.map +1 -1
- package/dist/meeting-notes.workflow.d.ts.map +1 -1
- package/dist/meeting-notes.workflow.js +9 -11
- package/dist/meeting-notes.workflow.js.map +1 -1
- package/dist/meeting-notes.workflow.yaml +4 -4
- package/package.json +3 -3
- package/src/documents/meeting-notes-document.ts +0 -2
- package/src/documents/optimized-notes-document.ts +0 -2
- package/src/meeting-notes.workflow.ts +0 -2
- package/src/meeting-notes.workflow.yaml +4 -4
package/README.md
CHANGED
|
@@ -12,9 +12,11 @@ By using this workflow as a reference, you'll learn how to:
|
|
|
12
12
|
|
|
13
13
|
- Use manual triggers to pause workflows for user input
|
|
14
14
|
- Create interactive documents with action buttons
|
|
15
|
-
- Handle transition payloads from user interactions
|
|
15
|
+
- Handle transition payloads from user interactions via `runtime.transition.payload`
|
|
16
16
|
- Transform unstructured text into structured data with AI
|
|
17
17
|
- Build review-and-confirm patterns for AI outputs
|
|
18
|
+
- Use `@State` to manage workflow state with schemas
|
|
19
|
+
- Use `@Input` to define workflow arguments and document content schemas
|
|
18
20
|
|
|
19
21
|
This example is essential for developers building workflows that require human oversight or approval steps.
|
|
20
22
|
|
|
@@ -66,7 +68,7 @@ See here for more information about working with [Modules](https://loopstack.ai/
|
|
|
66
68
|
|
|
67
69
|
### Workflow Flow
|
|
68
70
|
|
|
69
|
-
1. **Start** - User provides unstructured meeting notes
|
|
71
|
+
1. **Start** - User provides unstructured meeting notes via the input form
|
|
70
72
|
2. **Wait for Input** - User can edit the notes, then clicks "Optimize Notes"
|
|
71
73
|
3. **AI Processing** - LLM extracts structured information into a formatted document
|
|
72
74
|
4. **Review** - User reviews and can edit the structured output
|
|
@@ -74,7 +76,37 @@ See here for more information about working with [Modules](https://loopstack.ai/
|
|
|
74
76
|
|
|
75
77
|
### Key Concepts
|
|
76
78
|
|
|
77
|
-
#### 1.
|
|
79
|
+
#### 1. Workflow Input and State
|
|
80
|
+
|
|
81
|
+
Define input parameters with `@Input` and workflow state with `@State`:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
@Input({
|
|
85
|
+
schema: z.object({
|
|
86
|
+
inputText: z
|
|
87
|
+
.string()
|
|
88
|
+
.default(
|
|
89
|
+
'- meeting 1.1.2025\n- budget: need 2 cut costs sarah said\n...',
|
|
90
|
+
),
|
|
91
|
+
}),
|
|
92
|
+
})
|
|
93
|
+
args: {
|
|
94
|
+
inputText: string;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
@State({
|
|
98
|
+
schema: z.object({
|
|
99
|
+
meetingNotes: MeetingNotesDocumentSchema.optional(),
|
|
100
|
+
optimizedNotes: OptimizedMeetingNotesDocumentSchema.optional(),
|
|
101
|
+
}),
|
|
102
|
+
})
|
|
103
|
+
state: {
|
|
104
|
+
meetingNotes?: z.infer<typeof MeetingNotesDocumentSchema>;
|
|
105
|
+
optimizedNotes?: z.infer<typeof OptimizedMeetingNotesDocumentSchema>;
|
|
106
|
+
};
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### 2. Manual Triggers
|
|
78
110
|
|
|
79
111
|
Use `trigger: manual` to pause the workflow and wait for user interaction:
|
|
80
112
|
|
|
@@ -87,11 +119,13 @@ Use `trigger: manual` to pause the workflow and wait for user interaction:
|
|
|
87
119
|
|
|
88
120
|
The workflow pauses at `waiting_for_response` until the user triggers the transition.
|
|
89
121
|
|
|
90
|
-
####
|
|
122
|
+
#### 3. Document Actions with Buttons
|
|
91
123
|
|
|
92
|
-
Add action buttons to documents that trigger transitions:
|
|
124
|
+
Add action buttons to documents that trigger transitions. These are defined in the document's YAML config:
|
|
93
125
|
|
|
94
126
|
```yaml
|
|
127
|
+
# meeting-notes-document.yaml
|
|
128
|
+
type: document
|
|
95
129
|
ui:
|
|
96
130
|
form:
|
|
97
131
|
properties:
|
|
@@ -108,25 +142,52 @@ ui:
|
|
|
108
142
|
|
|
109
143
|
When clicked, the button triggers the `user_response` transition with the current document content.
|
|
110
144
|
|
|
111
|
-
####
|
|
145
|
+
#### 4. Transition Payloads
|
|
112
146
|
|
|
113
|
-
Access user input from the transition payload
|
|
147
|
+
Access user input from the transition payload using `runtime.transition.payload`:
|
|
114
148
|
|
|
115
149
|
```yaml
|
|
116
150
|
- id: user_response
|
|
151
|
+
from: waiting_for_response
|
|
152
|
+
to: response_received
|
|
117
153
|
trigger: manual
|
|
118
154
|
call:
|
|
119
|
-
-
|
|
155
|
+
- id: create_response
|
|
156
|
+
tool: createDocument
|
|
120
157
|
args:
|
|
158
|
+
id: input
|
|
159
|
+
document: meetingNotesDocument
|
|
121
160
|
update:
|
|
122
|
-
content: ${ transition.payload }
|
|
161
|
+
content: ${{ runtime.transition.payload }}
|
|
123
162
|
assign:
|
|
124
|
-
meetingNotes: ${ result.data.content }
|
|
163
|
+
meetingNotes: ${{ result.data.content }}
|
|
125
164
|
```
|
|
126
165
|
|
|
127
|
-
The `transition.payload` contains the document content when the user clicked the button.
|
|
166
|
+
The `runtime.transition.payload` contains the document content when the user clicked the button. The result is saved to workflow state via `assign`.
|
|
167
|
+
|
|
168
|
+
#### 5. Custom Document Schemas
|
|
169
|
+
|
|
170
|
+
Define document content schemas using `@Input` on the `content` property:
|
|
128
171
|
|
|
129
|
-
|
|
172
|
+
```typescript
|
|
173
|
+
export const MeetingNotesDocumentSchema = z.object({
|
|
174
|
+
text: z.string(),
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
@Document({
|
|
178
|
+
configFile: __dirname + '/meeting-notes-document.yaml',
|
|
179
|
+
})
|
|
180
|
+
export class MeetingNotesDocument implements DocumentInterface {
|
|
181
|
+
@Input({
|
|
182
|
+
schema: MeetingNotesDocumentSchema,
|
|
183
|
+
})
|
|
184
|
+
content: {
|
|
185
|
+
text: string;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
#### 6. Structured Output Documents
|
|
130
191
|
|
|
131
192
|
Define complex document schemas for structured AI output:
|
|
132
193
|
|
|
@@ -140,14 +201,25 @@ export const OptimizedMeetingNotesDocumentSchema = z.object({
|
|
|
140
201
|
});
|
|
141
202
|
```
|
|
142
203
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
Configure array fields with custom item titles and collapsed display:
|
|
204
|
+
Configure the document UI with ordering, collapsible arrays, and confirm button:
|
|
146
205
|
|
|
147
206
|
```yaml
|
|
207
|
+
# optimized-notes-document.yaml
|
|
208
|
+
type: document
|
|
148
209
|
ui:
|
|
149
210
|
form:
|
|
211
|
+
order:
|
|
212
|
+
- date
|
|
213
|
+
- summary
|
|
214
|
+
- participants
|
|
215
|
+
- decisions
|
|
216
|
+
- actionItems
|
|
150
217
|
properties:
|
|
218
|
+
date:
|
|
219
|
+
title: Date
|
|
220
|
+
summary:
|
|
221
|
+
title: Summary
|
|
222
|
+
widget: textarea
|
|
151
223
|
participants:
|
|
152
224
|
title: Participants
|
|
153
225
|
collapsed: true
|
|
@@ -158,33 +230,40 @@ ui:
|
|
|
158
230
|
collapsed: true
|
|
159
231
|
items:
|
|
160
232
|
title: Action Item
|
|
233
|
+
actions:
|
|
234
|
+
- type: button
|
|
235
|
+
widget: button
|
|
236
|
+
transition: confirm
|
|
237
|
+
options:
|
|
238
|
+
label: 'Confirm'
|
|
161
239
|
```
|
|
162
240
|
|
|
163
|
-
####
|
|
241
|
+
#### 7. AI Document Generation
|
|
164
242
|
|
|
165
|
-
Use `aiGenerateDocument` to populate a structured document
|
|
243
|
+
Use `aiGenerateDocument` to populate a structured document. Reference state values with `state.<name>`:
|
|
166
244
|
|
|
167
245
|
```yaml
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
246
|
+
- id: optimize_notes
|
|
247
|
+
from: response_received
|
|
248
|
+
to: notes_optimized
|
|
249
|
+
call:
|
|
250
|
+
- id: prompt
|
|
251
|
+
tool: aiGenerateDocument
|
|
252
|
+
args:
|
|
253
|
+
llm:
|
|
254
|
+
provider: openai
|
|
255
|
+
model: gpt-4o
|
|
256
|
+
response:
|
|
257
|
+
id: final
|
|
258
|
+
document: optimizedNotesDocument
|
|
259
|
+
prompt: |
|
|
260
|
+
Extract all information from the provided meeting notes into the structured document.
|
|
261
|
+
|
|
262
|
+
<Meeting Notes>
|
|
263
|
+
{{ state.meetingNotes.text }}
|
|
264
|
+
</Meeting Notes>
|
|
184
265
|
```
|
|
185
266
|
|
|
186
|
-
The LLM automatically fills in the document fields based on the schema.
|
|
187
|
-
|
|
188
267
|
## Dependencies
|
|
189
268
|
|
|
190
269
|
This workflow uses the following Loopstack modules:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meeting-notes-document.d.ts","sourceRoot":"","sources":["../../src/documents/meeting-notes-document.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meeting-notes-document.d.ts","sourceRoot":"","sources":["../../src/documents/meeting-notes-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAY,iBAAiB,EAAS,MAAM,mBAAmB,CAAC;AAEvE,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,qBAGa,oBAAqB,YAAW,iBAAiB;IAI5D,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH"}
|
|
@@ -10,9 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MeetingNotesDocument = exports.MeetingNotesDocumentSchema = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
13
|
const zod_1 = require("zod");
|
|
15
|
-
const
|
|
14
|
+
const common_1 = require("@loopstack/common");
|
|
16
15
|
exports.MeetingNotesDocumentSchema = zod_1.z.object({
|
|
17
16
|
text: zod_1.z.string(),
|
|
18
17
|
});
|
|
@@ -21,14 +20,13 @@ let MeetingNotesDocument = class MeetingNotesDocument {
|
|
|
21
20
|
};
|
|
22
21
|
exports.MeetingNotesDocument = MeetingNotesDocument;
|
|
23
22
|
__decorate([
|
|
24
|
-
(0,
|
|
23
|
+
(0, common_1.Input)({
|
|
25
24
|
schema: exports.MeetingNotesDocumentSchema,
|
|
26
25
|
}),
|
|
27
26
|
__metadata("design:type", Object)
|
|
28
27
|
], MeetingNotesDocument.prototype, "content", void 0);
|
|
29
28
|
exports.MeetingNotesDocument = MeetingNotesDocument = __decorate([
|
|
30
|
-
(0, common_1.
|
|
31
|
-
(0, common_2.Document)({
|
|
29
|
+
(0, common_1.Document)({
|
|
32
30
|
configFile: __dirname + '/meeting-notes-document.yaml',
|
|
33
31
|
})
|
|
34
32
|
], MeetingNotesDocument);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meeting-notes-document.js","sourceRoot":"","sources":["../../src/documents/meeting-notes-document.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"meeting-notes-document.js","sourceRoot":"","sources":["../../src/documents/meeting-notes-document.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAwB;AACxB,8CAAuE;AAE1D,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAKI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAI/B,OAAO,CAEL;CACH,CAAA;AAPY,oDAAoB;AAI/B;IAHC,IAAA,cAAK,EAAC;QACL,MAAM,EAAE,kCAA0B;KACnC,CAAC;;qDAGA;+BANS,oBAAoB;IAHhC,IAAA,iBAAQ,EAAC;QACR,UAAU,EAAE,SAAS,GAAG,8BAA8B;KACvD,CAAC;GACW,oBAAoB,CAOhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimized-notes-document.d.ts","sourceRoot":"","sources":["../../src/documents/optimized-notes-document.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"optimized-notes-document.d.ts","sourceRoot":"","sources":["../../src/documents/optimized-notes-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAY,iBAAiB,EAAS,MAAM,mBAAmB,CAAC;AAEvE,eAAO,MAAM,mCAAmC;;;;;;iBAM9C,CAAC;AAEH,qBAGa,sBAAuB,YAAW,iBAAiB;IAI9D,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;CAC9D"}
|
|
@@ -10,9 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.OptimizedNotesDocument = exports.OptimizedMeetingNotesDocumentSchema = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
13
|
const zod_1 = require("zod");
|
|
15
|
-
const
|
|
14
|
+
const common_1 = require("@loopstack/common");
|
|
16
15
|
exports.OptimizedMeetingNotesDocumentSchema = zod_1.z.object({
|
|
17
16
|
date: zod_1.z.string(),
|
|
18
17
|
summary: zod_1.z.string(),
|
|
@@ -25,14 +24,13 @@ let OptimizedNotesDocument = class OptimizedNotesDocument {
|
|
|
25
24
|
};
|
|
26
25
|
exports.OptimizedNotesDocument = OptimizedNotesDocument;
|
|
27
26
|
__decorate([
|
|
28
|
-
(0,
|
|
27
|
+
(0, common_1.Input)({
|
|
29
28
|
schema: exports.OptimizedMeetingNotesDocumentSchema,
|
|
30
29
|
}),
|
|
31
30
|
__metadata("design:type", Object)
|
|
32
31
|
], OptimizedNotesDocument.prototype, "content", void 0);
|
|
33
32
|
exports.OptimizedNotesDocument = OptimizedNotesDocument = __decorate([
|
|
34
|
-
(0, common_1.
|
|
35
|
-
(0, common_2.Document)({
|
|
33
|
+
(0, common_1.Document)({
|
|
36
34
|
configFile: __dirname + '/optimized-notes-document.yaml',
|
|
37
35
|
})
|
|
38
36
|
], OptimizedNotesDocument);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimized-notes-document.js","sourceRoot":"","sources":["../../src/documents/optimized-notes-document.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"optimized-notes-document.js","sourceRoot":"","sources":["../../src/documents/optimized-notes-document.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAwB;AACxB,8CAAuE;AAE1D,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IACjC,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;CACjC,CAAC,CAAC;AAKI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAIjC,OAAO,CAAsD;CAC9D,CAAA;AALY,wDAAsB;AAIjC;IAHC,IAAA,cAAK,EAAC;QACL,MAAM,EAAE,2CAAmC;KAC5C,CAAC;;uDAC2D;iCAJlD,sBAAsB;IAHlC,IAAA,iBAAQ,EAAC;QACR,UAAU,EAAE,SAAS,GAAG,gCAAgC;KACzD,CAAC;GACW,sBAAsB,CAKlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meeting-notes.workflow.d.ts","sourceRoot":"","sources":["../src/meeting-notes.workflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meeting-notes.workflow.d.ts","sourceRoot":"","sources":["../src/meeting-notes.workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,mCAAmC,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAEnH,qBAGa,oBAAoB;IACjB,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,cAAc,EAAE,cAAc,CAAC;IAC3B,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,sBAAsB,EAAE,sBAAsB,CAAC;IAWjE,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IAQF,KAAK,EAAE;QACL,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;QAC1D,cAAc,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;KACtE,CAAC;IAGF,OAAO,EAAE,GAAG,CAAC;CACd"}
|
|
@@ -10,10 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MeetingNotesWorkflow = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
13
|
const zod_1 = require("zod");
|
|
15
14
|
const ai_module_1 = require("@loopstack/ai-module");
|
|
16
|
-
const
|
|
15
|
+
const common_1 = require("@loopstack/common");
|
|
17
16
|
const core_ui_module_1 = require("@loopstack/core-ui-module");
|
|
18
17
|
const meeting_notes_document_1 = require("./documents/meeting-notes-document");
|
|
19
18
|
const optimized_notes_document_1 = require("./documents/optimized-notes-document");
|
|
@@ -28,23 +27,23 @@ let MeetingNotesWorkflow = class MeetingNotesWorkflow {
|
|
|
28
27
|
};
|
|
29
28
|
exports.MeetingNotesWorkflow = MeetingNotesWorkflow;
|
|
30
29
|
__decorate([
|
|
31
|
-
(0,
|
|
30
|
+
(0, common_1.InjectTool)(),
|
|
32
31
|
__metadata("design:type", ai_module_1.AiGenerateDocument)
|
|
33
32
|
], MeetingNotesWorkflow.prototype, "aiGenerateDocument", void 0);
|
|
34
33
|
__decorate([
|
|
35
|
-
(0,
|
|
34
|
+
(0, common_1.InjectTool)(),
|
|
36
35
|
__metadata("design:type", core_ui_module_1.CreateDocument)
|
|
37
36
|
], MeetingNotesWorkflow.prototype, "createDocument", void 0);
|
|
38
37
|
__decorate([
|
|
39
|
-
(0,
|
|
38
|
+
(0, common_1.InjectDocument)(),
|
|
40
39
|
__metadata("design:type", meeting_notes_document_1.MeetingNotesDocument)
|
|
41
40
|
], MeetingNotesWorkflow.prototype, "meetingNotesDocument", void 0);
|
|
42
41
|
__decorate([
|
|
43
|
-
(0,
|
|
42
|
+
(0, common_1.InjectDocument)(),
|
|
44
43
|
__metadata("design:type", optimized_notes_document_1.OptimizedNotesDocument)
|
|
45
44
|
], MeetingNotesWorkflow.prototype, "optimizedNotesDocument", void 0);
|
|
46
45
|
__decorate([
|
|
47
|
-
(0,
|
|
46
|
+
(0, common_1.Input)({
|
|
48
47
|
schema: zod_1.z.object({
|
|
49
48
|
inputText: zod_1.z
|
|
50
49
|
.string()
|
|
@@ -54,7 +53,7 @@ __decorate([
|
|
|
54
53
|
__metadata("design:type", Object)
|
|
55
54
|
], MeetingNotesWorkflow.prototype, "args", void 0);
|
|
56
55
|
__decorate([
|
|
57
|
-
(0,
|
|
56
|
+
(0, common_1.State)({
|
|
58
57
|
schema: zod_1.z.object({
|
|
59
58
|
meetingNotes: meeting_notes_document_1.MeetingNotesDocumentSchema.optional(),
|
|
60
59
|
optimizedNotes: optimized_notes_document_1.OptimizedMeetingNotesDocumentSchema.optional(),
|
|
@@ -63,12 +62,11 @@ __decorate([
|
|
|
63
62
|
__metadata("design:type", Object)
|
|
64
63
|
], MeetingNotesWorkflow.prototype, "state", void 0);
|
|
65
64
|
__decorate([
|
|
66
|
-
(0,
|
|
65
|
+
(0, common_1.Runtime)(),
|
|
67
66
|
__metadata("design:type", Object)
|
|
68
67
|
], MeetingNotesWorkflow.prototype, "runtime", void 0);
|
|
69
68
|
exports.MeetingNotesWorkflow = MeetingNotesWorkflow = __decorate([
|
|
70
|
-
(0, common_1.
|
|
71
|
-
(0, common_2.Workflow)({
|
|
69
|
+
(0, common_1.Workflow)({
|
|
72
70
|
configFile: __dirname + '/meeting-notes.workflow.yaml',
|
|
73
71
|
})
|
|
74
72
|
], MeetingNotesWorkflow);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meeting-notes.workflow.js","sourceRoot":"","sources":["../src/meeting-notes.workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"meeting-notes.workflow.js","sourceRoot":"","sources":["../src/meeting-notes.workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAwB;AACxB,oDAA0D;AAC1D,8CAAgG;AAChG,8DAA2D;AAC3D,+EAAsG;AACtG,mFAAmH;AAK5G,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IACjB,kBAAkB,CAAqB;IACvC,cAAc,CAAiB;IAC3B,oBAAoB,CAAuB;IAC3C,sBAAsB,CAAyB;IAWjE,IAAI,CAEF;IAQF,KAAK,CAGH;IAGF,OAAO,CAAM;CACd,CAAA;AAhCY,oDAAoB;AACjB;IAAb,IAAA,mBAAU,GAAE;8BAAqB,8BAAkB;gEAAC;AACvC;IAAb,IAAA,mBAAU,GAAE;8BAAiB,+BAAc;4DAAC;AAC3B;IAAjB,IAAA,uBAAc,GAAE;8BAAuB,6CAAoB;kEAAC;AAC3C;IAAjB,IAAA,uBAAc,GAAE;8BAAyB,iDAAsB;oEAAC;AAWjE;IATC,IAAA,cAAK,EAAC;QACL,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,SAAS,EAAE,OAAC;iBACT,MAAM,EAAE;iBACR,OAAO,CACN,2IAA2I,CAC5I;SACJ,CAAC;KACH,CAAC;;kDAGA;AAQF;IANC,IAAA,cAAK,EAAC;QACL,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,YAAY,EAAE,mDAA0B,CAAC,QAAQ,EAAE;YACnD,cAAc,EAAE,8DAAmC,CAAC,QAAQ,EAAE;SAC/D,CAAC;KACH,CAAC;;mDAIA;AAGF;IADC,IAAA,gBAAO,GAAE;;qDACG;+BA/BF,oBAAoB;IAHhC,IAAA,iBAAQ,EAAC;QACR,UAAU,EAAE,SAAS,GAAG,8BAA8B;KACvD,CAAC;GACW,oBAAoB,CAgChC"}
|
|
@@ -37,9 +37,9 @@ transitions:
|
|
|
37
37
|
id: input
|
|
38
38
|
document: meetingNotesDocument
|
|
39
39
|
update:
|
|
40
|
-
content: ${ runtime.transition.payload }
|
|
40
|
+
content: ${{ runtime.transition.payload }}
|
|
41
41
|
assign:
|
|
42
|
-
meetingNotes: ${ result.data.content }
|
|
42
|
+
meetingNotes: ${{ result.data.content }}
|
|
43
43
|
|
|
44
44
|
- id: optimize_notes
|
|
45
45
|
from: response_received
|
|
@@ -72,6 +72,6 @@ transitions:
|
|
|
72
72
|
id: final
|
|
73
73
|
document: optimizedNotesDocument
|
|
74
74
|
update:
|
|
75
|
-
content: ${ runtime.transition.payload }
|
|
75
|
+
content: ${{ runtime.transition.payload }}
|
|
76
76
|
assign:
|
|
77
|
-
optimizedNotes: ${ result.data.content }
|
|
77
|
+
optimizedNotes: ${{ result.data.content }}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"summary",
|
|
10
10
|
"workflow"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.20.
|
|
12
|
+
"version": "0.20.1",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Jakob Klippel",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"watch": "nest build --watch"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@loopstack/ai-module": "^0.20.
|
|
33
|
+
"@loopstack/ai-module": "^0.20.1",
|
|
34
34
|
"@loopstack/common": "^0.20.0",
|
|
35
|
-
"@loopstack/core-ui-module": "^0.20.
|
|
35
|
+
"@loopstack/core-ui-module": "^0.20.1",
|
|
36
36
|
"@nestjs/common": "^11.1.12",
|
|
37
37
|
"zod": "^4.3.5"
|
|
38
38
|
},
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
import { Document, DocumentInterface, Input } from '@loopstack/common';
|
|
4
3
|
|
|
@@ -6,7 +5,6 @@ export const MeetingNotesDocumentSchema = z.object({
|
|
|
6
5
|
text: z.string(),
|
|
7
6
|
});
|
|
8
7
|
|
|
9
|
-
@Injectable()
|
|
10
8
|
@Document({
|
|
11
9
|
configFile: __dirname + '/meeting-notes-document.yaml',
|
|
12
10
|
})
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
import { Document, DocumentInterface, Input } from '@loopstack/common';
|
|
4
3
|
|
|
@@ -10,7 +9,6 @@ export const OptimizedMeetingNotesDocumentSchema = z.object({
|
|
|
10
9
|
actionItems: z.array(z.string()),
|
|
11
10
|
});
|
|
12
11
|
|
|
13
|
-
@Injectable()
|
|
14
12
|
@Document({
|
|
15
13
|
configFile: __dirname + '/optimized-notes-document.yaml',
|
|
16
14
|
})
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Injectable } from '@nestjs/common';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
import { AiGenerateDocument } from '@loopstack/ai-module';
|
|
4
3
|
import { InjectDocument, InjectTool, Input, Runtime, State, Workflow } from '@loopstack/common';
|
|
@@ -6,7 +5,6 @@ import { CreateDocument } from '@loopstack/core-ui-module';
|
|
|
6
5
|
import { MeetingNotesDocument, MeetingNotesDocumentSchema } from './documents/meeting-notes-document';
|
|
7
6
|
import { OptimizedMeetingNotesDocumentSchema, OptimizedNotesDocument } from './documents/optimized-notes-document';
|
|
8
7
|
|
|
9
|
-
@Injectable()
|
|
10
8
|
@Workflow({
|
|
11
9
|
configFile: __dirname + '/meeting-notes.workflow.yaml',
|
|
12
10
|
})
|
|
@@ -37,9 +37,9 @@ transitions:
|
|
|
37
37
|
id: input
|
|
38
38
|
document: meetingNotesDocument
|
|
39
39
|
update:
|
|
40
|
-
content: ${ runtime.transition.payload }
|
|
40
|
+
content: ${{ runtime.transition.payload }}
|
|
41
41
|
assign:
|
|
42
|
-
meetingNotes: ${ result.data.content }
|
|
42
|
+
meetingNotes: ${{ result.data.content }}
|
|
43
43
|
|
|
44
44
|
- id: optimize_notes
|
|
45
45
|
from: response_received
|
|
@@ -72,6 +72,6 @@ transitions:
|
|
|
72
72
|
id: final
|
|
73
73
|
document: optimizedNotesDocument
|
|
74
74
|
update:
|
|
75
|
-
content: ${ runtime.transition.payload }
|
|
75
|
+
content: ${{ runtime.transition.payload }}
|
|
76
76
|
assign:
|
|
77
|
-
optimizedNotes: ${ result.data.content }
|
|
77
|
+
optimizedNotes: ${{ result.data.content }}
|