@loopstack/meeting-notes-example-workflow 0.20.7 → 0.21.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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > A module for the [Loopstack AI](https://loopstack.ai) automation framework.
4
4
 
5
- This module provides an example workflow demonstrating how to build human-in-the-loop AI workflows with manual triggers and interactive documents.
5
+ This module provides an example workflow demonstrating how to build human-in-the-loop AI workflows with interactive documents and review steps.
6
6
 
7
7
  ## Overview
8
8
 
@@ -10,13 +10,13 @@ The Meeting Notes Example Workflow shows how to create workflows that pause for
10
10
 
11
11
  By using this workflow as a reference, you'll learn how to:
12
12
 
13
- - Use manual triggers to pause workflows for user input
13
+ - Use `wait: true` transitions to pause workflows for user input
14
14
  - Create interactive documents with action buttons
15
- - Handle transition payloads from user interactions via `runtime.transition.payload`
16
- - Transform unstructured text into structured data with AI
15
+ - Handle transition payloads from user interactions
16
+ - Transform unstructured text into structured data with AI using `ClaudeGenerateDocument`
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
+ - Define workflow input schemas via the `@Workflow` decorator
19
+ - Use the document repository to save and update documents
20
20
 
21
21
  This example is essential for developers building workflows that require human oversight or approval steps.
22
22
 
@@ -30,54 +30,48 @@ See [SETUP.md](./SETUP.md) for installation and setup instructions.
30
30
 
31
31
  1. **Start** - User provides unstructured meeting notes via the input form
32
32
  2. **Wait for Input** - User can edit the notes, then clicks "Optimize Notes"
33
- 3. **AI Processing** - LLM extracts structured information into a formatted document
33
+ 3. **AI Processing** - Claude extracts structured information into a formatted document
34
34
  4. **Review** - User reviews and can edit the structured output
35
35
  5. **Confirm** - User clicks "Confirm" to finalize
36
36
 
37
37
  ### Key Concepts
38
38
 
39
- #### 1. Workflow Input and State
39
+ #### 1. Workflow Input Schema
40
40
 
41
- Define input parameters with `@Input` and workflow state with `@State`:
41
+ Define input parameters directly in the `@Workflow` decorator with a Zod schema:
42
42
 
43
43
  ```typescript
44
- @Input({
44
+ @Workflow({
45
+ uiConfig: __dirname + '/meeting-notes.ui.yaml',
45
46
  schema: z.object({
46
47
  inputText: z
47
48
  .string()
48
49
  .default(
49
- '- meeting 1.1.2025\n- budget: need 2 cut costs sarah said\n...',
50
+ '- meeting 1.1.2025\n- budget: need 2 cut costs sarah said\n- hire new person?? --> marketing\n- vendor pricing - follow up needed by anna',
50
51
  ),
51
52
  }),
52
53
  })
53
- args: {
54
- inputText: string;
55
- };
54
+ export class MeetingNotesWorkflow extends BaseWorkflow<{ inputText: string }> {
55
+ @InjectTool() claudeGenerateDocument: ClaudeGenerateDocument;
56
56
 
57
- @State({
58
- schema: z.object({
59
- meetingNotes: MeetingNotesDocumentSchema.optional(),
60
- optimizedNotes: OptimizedMeetingNotesDocumentSchema.optional(),
61
- }),
62
- })
63
- state: {
64
57
  meetingNotes?: z.infer<typeof MeetingNotesDocumentSchema>;
65
58
  optimizedNotes?: z.infer<typeof OptimizedMeetingNotesDocumentSchema>;
66
- };
59
+ }
67
60
  ```
68
61
 
69
- #### 2. Manual Triggers
62
+ #### 2. Waiting Transitions
70
63
 
71
- Use `trigger: manual` to pause the workflow and wait for user interaction:
64
+ Use `wait: true` with a `schema` to pause the workflow and wait for user interaction. The schema validates the payload submitted by the user:
72
65
 
73
- ```yaml
74
- - id: user_response
75
- from: waiting_for_response
76
- to: response_received
77
- trigger: manual
66
+ ```typescript
67
+ @Transition({ from: 'waiting_for_response', to: 'response_received', wait: true, schema: MeetingNotesDocumentSchema })
68
+ async userResponse(payload: z.infer<typeof MeetingNotesDocumentSchema>) {
69
+ const result = await this.repository.save(MeetingNotesDocument, payload, { id: 'input' });
70
+ this.meetingNotes = result.content as z.infer<typeof MeetingNotesDocumentSchema>;
71
+ }
78
72
  ```
79
73
 
80
- The workflow pauses at `waiting_for_response` until the user triggers the transition.
74
+ The workflow pauses at `waiting_for_response` until the user submits data via the document button.
81
75
 
82
76
  #### 3. Document Actions with Buttons
83
77
 
@@ -87,47 +81,24 @@ Add action buttons to documents that trigger transitions. These are defined in t
87
81
  # meeting-notes-document.yaml
88
82
  type: document
89
83
  ui:
90
- form:
91
- properties:
92
- text:
93
- title: Text
94
- widget: textarea
95
- actions:
96
- - type: button
97
- widget: button
98
- transition: user_response
84
+ widgets:
85
+ - widget: form
99
86
  options:
100
- label: 'Optimize Notes'
101
- ```
102
-
103
- When clicked, the button triggers the `user_response` transition with the current document content.
104
-
105
- #### 4. Transition Payloads
106
-
107
- Access user input from the transition payload using `runtime.transition.payload`:
108
-
109
- ```yaml
110
- - id: user_response
111
- from: waiting_for_response
112
- to: response_received
113
- trigger: manual
114
- call:
115
- - id: create_response
116
- tool: createDocument
117
- args:
118
- id: input
119
- document: meetingNotesDocument
120
- update:
121
- content: ${{ runtime.transition.payload }}
122
- assign:
123
- meetingNotes: ${{ result.data.content }}
87
+ properties:
88
+ text:
89
+ title: Text
90
+ widget: textarea
91
+ actions:
92
+ - type: button
93
+ transition: userResponse
94
+ label: 'Optimize Notes'
124
95
  ```
125
96
 
126
- The `runtime.transition.payload` contains the document content when the user clicked the button. The result is saved to workflow state via `assign`.
97
+ When clicked, the button triggers the `userResponse` transition with the current document content as the payload.
127
98
 
128
- #### 5. Custom Document Schemas
99
+ #### 4. Custom Document Schemas
129
100
 
130
- Define document content schemas using `@Input` on the `content` property:
101
+ Define document content schemas using the `@Document` decorator with a Zod schema:
131
102
 
132
103
  ```typescript
133
104
  export const MeetingNotesDocumentSchema = z.object({
@@ -135,19 +106,15 @@ export const MeetingNotesDocumentSchema = z.object({
135
106
  });
136
107
 
137
108
  @Document({
138
- configFile: __dirname + '/meeting-notes-document.yaml',
109
+ schema: MeetingNotesDocumentSchema,
110
+ uiConfig: __dirname + '/meeting-notes-document.yaml',
139
111
  })
140
- export class MeetingNotesDocument implements DocumentInterface {
141
- @Input({
142
- schema: MeetingNotesDocumentSchema,
143
- })
144
- content: {
145
- text: string;
146
- };
112
+ export class MeetingNotesDocument {
113
+ text: string;
147
114
  }
148
115
  ```
149
116
 
150
- #### 6. Structured Output Documents
117
+ #### 5. Structured Output Documents
151
118
 
152
119
  Define complex document schemas for structured AI output:
153
120
 
@@ -159,6 +126,18 @@ export const OptimizedMeetingNotesDocumentSchema = z.object({
159
126
  decisions: z.array(z.string()),
160
127
  actionItems: z.array(z.string()),
161
128
  });
129
+
130
+ @Document({
131
+ schema: OptimizedMeetingNotesDocumentSchema,
132
+ uiConfig: __dirname + '/optimized-notes-document.yaml',
133
+ })
134
+ export class OptimizedNotesDocument {
135
+ date: string;
136
+ summary: string;
137
+ participants: string[];
138
+ decisions: string[];
139
+ actionItems: string[];
140
+ }
162
141
  ```
163
142
 
164
143
  Configure the document UI with ordering, collapsible arrays, and confirm button:
@@ -167,70 +146,55 @@ Configure the document UI with ordering, collapsible arrays, and confirm button:
167
146
  # optimized-notes-document.yaml
168
147
  type: document
169
148
  ui:
170
- form:
171
- order:
172
- - date
173
- - summary
174
- - participants
175
- - decisions
176
- - actionItems
177
- properties:
178
- date:
179
- title: Date
180
- summary:
181
- title: Summary
182
- widget: textarea
183
- participants:
184
- title: Participants
185
- collapsed: true
186
- items:
187
- title: Participant
188
- actionItems:
189
- title: Action Items
190
- collapsed: true
191
- items:
192
- title: Action Item
193
- actions:
194
- - type: button
195
- widget: button
196
- transition: confirm
149
+ widgets:
150
+ - widget: form
197
151
  options:
198
- label: 'Confirm'
152
+ order: [date, summary, participants, decisions, actionItems]
153
+ properties:
154
+ date: { title: Date }
155
+ summary: { title: Summary, widget: textarea }
156
+ participants: { title: Participants, collapsed: true, items: { title: Participant } }
157
+ decisions: { title: Decisions, collapsed: true, items: { title: Decision } }
158
+ actionItems: { title: Action Items, collapsed: true, items: { title: Action Item } }
159
+ actions:
160
+ - type: button
161
+ transition: confirm
162
+ label: 'Confirm'
199
163
  ```
200
164
 
201
- #### 7. AI Document Generation
165
+ #### 6. AI Document Generation
202
166
 
203
- Use `aiGenerateDocument` to populate a structured document. Reference state values with `state.<name>`:
167
+ Use `ClaudeGenerateDocument` to populate a structured document. Reference workflow properties for dynamic content:
204
168
 
205
- ```yaml
206
- - id: optimize_notes
207
- from: response_received
208
- to: notes_optimized
209
- call:
210
- - id: prompt
211
- tool: aiGenerateDocument
212
- args:
213
- llm:
214
- provider: openai
215
- model: gpt-4o
216
- response:
217
- id: final
218
- document: optimizedNotesDocument
219
- prompt: |
220
- Extract all information from the provided meeting notes into the structured document.
221
-
222
- <Meeting Notes>
223
- {{ state.meetingNotes.text }}
224
- </Meeting Notes>
169
+ ```typescript
170
+ @Transition({ from: 'response_received', to: 'notes_optimized' })
171
+ async optimizeNotes() {
172
+ await this.claudeGenerateDocument.call({
173
+ claude: { model: 'claude-sonnet-4-6' },
174
+ response: { id: 'final', document: OptimizedNotesDocument },
175
+ prompt: `Extract all information from the provided meeting notes into the structured document.\n\n<Meeting Notes>\n${this.meetingNotes?.text}\n</Meeting Notes>`,
176
+ });
177
+ }
178
+ ```
179
+
180
+ #### 7. Final Confirmation with Wait
181
+
182
+ Use `@Final` with `wait: true` to create a review step before the workflow ends:
183
+
184
+ ```typescript
185
+ @Final({ from: 'notes_optimized', wait: true, schema: OptimizedMeetingNotesDocumentSchema })
186
+ async confirm(payload: z.infer<typeof OptimizedMeetingNotesDocumentSchema>) {
187
+ const result = await this.repository.save(OptimizedNotesDocument, payload, { id: 'final' });
188
+ this.optimizedNotes = result.content as z.infer<typeof OptimizedMeetingNotesDocumentSchema>;
189
+ }
225
190
  ```
226
191
 
227
192
  ## Dependencies
228
193
 
229
194
  This workflow uses the following Loopstack modules:
230
195
 
231
- - `@loopstack/core` - Core framework functionality
232
- - `@loopstack/core` - Provides `CreateDocument` tool
233
- - `@loopstack/ai-module` - Provides `AiGenerateDocument` tool
196
+ - `@loopstack/common` - Core framework decorators (`BaseWorkflow`, `@Workflow`, `@Initial`, `@Transition`, `@Final`, `@InjectTool`, `Document`)
197
+ - `@loopstack/claude-module` - Provides `ClaudeGenerateDocument` tool for AI-powered document generation
234
198
 
235
199
  ## About
236
200
 
@@ -1,11 +1,8 @@
1
1
  import { z } from 'zod';
2
- import { DocumentInterface } from '@loopstack/common';
3
2
  export declare const MeetingNotesDocumentSchema: z.ZodObject<{
4
3
  text: z.ZodString;
5
4
  }, z.core.$strip>;
6
- export declare class MeetingNotesDocument implements DocumentInterface {
7
- content: {
8
- text: string;
9
- };
5
+ export declare class MeetingNotesDocument {
6
+ text: string;
10
7
  }
11
8
  //# sourceMappingURL=meeting-notes-document.d.ts.map
@@ -1 +1 @@
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"}
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;AAGxB,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,qBAIa,oBAAoB;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -5,9 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
8
  Object.defineProperty(exports, "__esModule", { value: true });
12
9
  exports.MeetingNotesDocument = exports.MeetingNotesDocumentSchema = void 0;
13
10
  const zod_1 = require("zod");
@@ -16,18 +13,13 @@ exports.MeetingNotesDocumentSchema = zod_1.z.object({
16
13
  text: zod_1.z.string(),
17
14
  });
18
15
  let MeetingNotesDocument = class MeetingNotesDocument {
19
- content;
16
+ text;
20
17
  };
21
18
  exports.MeetingNotesDocument = MeetingNotesDocument;
22
- __decorate([
23
- (0, common_1.Input)({
24
- schema: exports.MeetingNotesDocumentSchema,
25
- }),
26
- __metadata("design:type", Object)
27
- ], MeetingNotesDocument.prototype, "content", void 0);
28
19
  exports.MeetingNotesDocument = MeetingNotesDocument = __decorate([
29
20
  (0, common_1.Document)({
30
- configFile: __dirname + '/meeting-notes-document.yaml',
21
+ schema: exports.MeetingNotesDocumentSchema,
22
+ uiConfig: __dirname + '/meeting-notes-document.yaml',
31
23
  })
32
24
  ], MeetingNotesDocument);
33
25
  //# sourceMappingURL=meeting-notes-document.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"meeting-notes-document.js","sourceRoot":"","sources":["../../src/documents/meeting-notes-document.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA6C;AAEhC,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAMI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,IAAI,CAAS;CACd,CAAA;AAFY,oDAAoB;+BAApB,oBAAoB;IAJhC,IAAA,iBAAQ,EAAC;QACR,MAAM,EAAE,kCAA0B;QAClC,QAAQ,EAAE,SAAS,GAAG,8BAA8B;KACrD,CAAC;GACW,oBAAoB,CAEhC"}
@@ -1,13 +1,13 @@
1
1
  type: document
2
2
  ui:
3
- form:
4
- properties:
5
- text:
6
- title: Text
7
- widget: textarea
8
- actions:
9
- - type: button
10
- widget: button
3
+ widgets:
4
+ - widget: form
11
5
  options:
12
- transition: user_response
13
- label: 'Optimize Notes'
6
+ properties:
7
+ text:
8
+ title: Text
9
+ widget: textarea
10
+ actions:
11
+ - type: button
12
+ transition: userResponse
13
+ label: 'Optimize Notes'
@@ -1,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- import { DocumentInterface } from '@loopstack/common';
3
2
  export declare const OptimizedMeetingNotesDocumentSchema: z.ZodObject<{
4
3
  date: z.ZodString;
5
4
  summary: z.ZodString;
@@ -7,7 +6,11 @@ export declare const OptimizedMeetingNotesDocumentSchema: z.ZodObject<{
7
6
  decisions: z.ZodArray<z.ZodString>;
8
7
  actionItems: z.ZodArray<z.ZodString>;
9
8
  }, z.core.$strip>;
10
- export declare class OptimizedNotesDocument implements DocumentInterface {
11
- content: z.infer<typeof OptimizedMeetingNotesDocumentSchema>;
9
+ export declare class OptimizedNotesDocument {
10
+ date: string;
11
+ summary: string;
12
+ participants: string[];
13
+ decisions: string[];
14
+ actionItems: string[];
12
15
  }
13
16
  //# sourceMappingURL=optimized-notes-document.d.ts.map
@@ -1 +1 @@
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"}
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;AAGxB,eAAO,MAAM,mCAAmC;;;;;;iBAM9C,CAAC;AAEH,qBAIa,sBAAsB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
@@ -5,9 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
8
  Object.defineProperty(exports, "__esModule", { value: true });
12
9
  exports.OptimizedNotesDocument = exports.OptimizedMeetingNotesDocumentSchema = void 0;
13
10
  const zod_1 = require("zod");
@@ -20,18 +17,17 @@ exports.OptimizedMeetingNotesDocumentSchema = zod_1.z.object({
20
17
  actionItems: zod_1.z.array(zod_1.z.string()),
21
18
  });
22
19
  let OptimizedNotesDocument = class OptimizedNotesDocument {
23
- content;
20
+ date;
21
+ summary;
22
+ participants;
23
+ decisions;
24
+ actionItems;
24
25
  };
25
26
  exports.OptimizedNotesDocument = OptimizedNotesDocument;
26
- __decorate([
27
- (0, common_1.Input)({
28
- schema: exports.OptimizedMeetingNotesDocumentSchema,
29
- }),
30
- __metadata("design:type", Object)
31
- ], OptimizedNotesDocument.prototype, "content", void 0);
32
27
  exports.OptimizedNotesDocument = OptimizedNotesDocument = __decorate([
33
28
  (0, common_1.Document)({
34
- configFile: __dirname + '/optimized-notes-document.yaml',
29
+ schema: exports.OptimizedMeetingNotesDocumentSchema,
30
+ uiConfig: __dirname + '/optimized-notes-document.yaml',
35
31
  })
36
32
  ], OptimizedNotesDocument);
37
33
  //# sourceMappingURL=optimized-notes-document.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"optimized-notes-document.js","sourceRoot":"","sources":["../../src/documents/optimized-notes-document.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6BAAwB;AACxB,8CAA6C;AAEhC,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;AAMI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,IAAI,CAAS;IACb,OAAO,CAAS;IAChB,YAAY,CAAW;IACvB,SAAS,CAAW;IACpB,WAAW,CAAW;CACvB,CAAA;AANY,wDAAsB;iCAAtB,sBAAsB;IAJlC,IAAA,iBAAQ,EAAC;QACR,MAAM,EAAE,2CAAmC;QAC3C,QAAQ,EAAE,SAAS,GAAG,gCAAgC;KACvD,CAAC;GACW,sBAAsB,CAMlC"}
@@ -1,36 +1,36 @@
1
1
  type: document
2
2
  ui:
3
- form:
4
- order:
5
- - date
6
- - summary
7
- - participants
8
- - decisions
9
- - actionItems
10
- properties:
11
- date:
12
- title: Date
13
- summary:
14
- title: Summary
15
- widget: textarea
16
- participants:
17
- title: Participants
18
- collapsed: true
19
- items:
20
- title: Participant
21
- decisions:
22
- title: Decisions
23
- collapsed: true
24
- items:
25
- title: Decision
26
- actionItems:
27
- title: Action Items
28
- collapsed: true
29
- items:
30
- title: Action Item
31
- actions:
32
- - type: button
33
- widget: button
3
+ widgets:
4
+ - widget: form
34
5
  options:
35
- transition: confirm
36
- label: 'Confirm'
6
+ order:
7
+ - date
8
+ - summary
9
+ - participants
10
+ - decisions
11
+ - actionItems
12
+ properties:
13
+ date:
14
+ title: Date
15
+ summary:
16
+ title: Summary
17
+ widget: textarea
18
+ participants:
19
+ title: Participants
20
+ collapsed: true
21
+ items:
22
+ title: Participant
23
+ decisions:
24
+ title: Decisions
25
+ collapsed: true
26
+ items:
27
+ title: Decision
28
+ actionItems:
29
+ title: Action Items
30
+ collapsed: true
31
+ items:
32
+ title: Action Item
33
+ actions:
34
+ - type: button
35
+ transition: confirm
36
+ label: 'Confirm'
@@ -0,0 +1,10 @@
1
+ title: 'Human-in-the-loop Demo (Meeting Notes Optimizer)'
2
+
3
+ description: 'A demo workflow to demonstrate how to use AI to structure meeting notes.'
4
+
5
+ ui:
6
+ form:
7
+ properties:
8
+ inputText:
9
+ title: 'Text'
10
+ widget: 'textarea'
@@ -1,20 +1,19 @@
1
1
  import { z } from 'zod';
2
2
  import { ClaudeGenerateDocument } from '@loopstack/claude-module';
3
- import { CreateDocument } from '@loopstack/core';
4
- import { MeetingNotesDocument, MeetingNotesDocumentSchema } from './documents/meeting-notes-document';
5
- import { OptimizedMeetingNotesDocumentSchema, OptimizedNotesDocument } from './documents/optimized-notes-document';
6
- export declare class MeetingNotesWorkflow {
3
+ import { BaseWorkflow } from '@loopstack/common';
4
+ import { MeetingNotesDocumentSchema } from './documents/meeting-notes-document';
5
+ import { OptimizedMeetingNotesDocumentSchema } from './documents/optimized-notes-document';
6
+ export declare class MeetingNotesWorkflow extends BaseWorkflow<{
7
+ inputText: string;
8
+ }> {
7
9
  claudeGenerateDocument: ClaudeGenerateDocument;
8
- createDocument: CreateDocument;
9
- meetingNotesDocument: MeetingNotesDocument;
10
- optimizedNotesDocument: OptimizedNotesDocument;
11
- args: {
10
+ meetingNotes?: z.infer<typeof MeetingNotesDocumentSchema>;
11
+ optimizedNotes?: z.infer<typeof OptimizedMeetingNotesDocumentSchema>;
12
+ createForm(args: {
12
13
  inputText: string;
13
- };
14
- state: {
15
- meetingNotes?: z.infer<typeof MeetingNotesDocumentSchema>;
16
- optimizedNotes?: z.infer<typeof OptimizedMeetingNotesDocumentSchema>;
17
- };
18
- runtime: any;
14
+ }): Promise<void>;
15
+ userResponse(payload: z.infer<typeof MeetingNotesDocumentSchema>): Promise<void>;
16
+ optimizeNotes(): Promise<void>;
17
+ confirm(payload: z.infer<typeof OptimizedMeetingNotesDocumentSchema>): Promise<void>;
19
18
  }
20
19
  //# sourceMappingURL=meeting-notes.workflow.d.ts.map
@@ -1 +1 @@
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,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,mCAAmC,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAEnH,qBAGa,oBAAoB;IACjB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,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"}
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,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAoD,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAwB,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,mCAAmC,EAA0B,MAAM,sCAAsC,CAAC;AAEnH,qBAUa,oBAAqB,SAAQ,YAAY,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;IAC7D,sBAAsB,EAAE,sBAAsB,CAAC;IAE7D,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;IAC1D,cAAc,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;IAG/D,UAAU,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE;IAWtC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC;IAMhE,aAAa;IAgBb,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC;CAI3E"}