@loopstack/meeting-notes-example-workflow 0.23.0 → 0.23.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BaseWorkflow } from '@loopstack/common';
|
|
3
|
-
import type { LoopstackContext
|
|
3
|
+
import type { LoopstackContext } from '@loopstack/common';
|
|
4
4
|
import { LlmGenerateObjectTool } from '@loopstack/llm-provider-module';
|
|
5
5
|
import { MeetingNotesDocumentSchema } from './documents/meeting-notes-document';
|
|
6
6
|
import { OptimizedMeetingNotesDocumentSchema } from './documents/optimized-notes-document';
|
|
@@ -12,8 +12,7 @@ export declare class MeetingNotesWorkflow extends BaseWorkflow<{
|
|
|
12
12
|
inputText: string;
|
|
13
13
|
}, MeetingNotesState> {
|
|
14
14
|
private readonly llmGenerateObject;
|
|
15
|
-
|
|
16
|
-
constructor(llmGenerateObject: LlmGenerateObjectTool, render: TemplateRenderFn);
|
|
15
|
+
constructor(llmGenerateObject: LlmGenerateObjectTool);
|
|
17
16
|
createForm(state: MeetingNotesState, ctx: LoopstackContext): Promise<MeetingNotesState>;
|
|
18
17
|
userResponse(state: MeetingNotesState, payload: z.infer<typeof MeetingNotesDocumentSchema>): Promise<MeetingNotesState>;
|
|
19
18
|
optimizeNotes(state: MeetingNotesState): Promise<MeetingNotesState>;
|
|
@@ -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;AAExB,OAAO,EAAE,YAAY,EAAwB,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAwB,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACtG,OAAO,EAAE,mCAAmC,EAA0B,MAAM,sCAAsC,CAAC;AAEnH,UAAU,iBAAiB;IACzB,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;IAC1D,cAAc,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;CACtE;AAED,qBAWa,oBAAqB,SAAQ,YAAY,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,EAAE,iBAAiB,CAAC;IAClF,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,qBAAqB;IAK/D,UAAU,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAWvF,YAAY,CAChB,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,GAClD,OAAO,CAAC,iBAAiB,CAAC;IAMvB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwBnE,OAAO,CACX,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,GAC3D,OAAO,CAAC,OAAO,CAAC;CAIpB"}
|
|
@@ -8,25 +8,19 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.MeetingNotesWorkflow = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
13
|
const zod_1 = require("zod");
|
|
18
14
|
const zod_2 = require("zod");
|
|
19
|
-
const
|
|
15
|
+
const common_1 = require("@loopstack/common");
|
|
20
16
|
const llm_provider_module_1 = require("@loopstack/llm-provider-module");
|
|
21
17
|
const meeting_notes_document_1 = require("./documents/meeting-notes-document");
|
|
22
18
|
const optimized_notes_document_1 = require("./documents/optimized-notes-document");
|
|
23
|
-
let MeetingNotesWorkflow = class MeetingNotesWorkflow extends
|
|
19
|
+
let MeetingNotesWorkflow = class MeetingNotesWorkflow extends common_1.BaseWorkflow {
|
|
24
20
|
llmGenerateObject;
|
|
25
|
-
|
|
26
|
-
constructor(llmGenerateObject, render) {
|
|
21
|
+
constructor(llmGenerateObject) {
|
|
27
22
|
super();
|
|
28
23
|
this.llmGenerateObject = llmGenerateObject;
|
|
29
|
-
this.render = render;
|
|
30
24
|
}
|
|
31
25
|
async createForm(state, ctx) {
|
|
32
26
|
const args = ctx.args;
|
|
@@ -58,31 +52,31 @@ let MeetingNotesWorkflow = class MeetingNotesWorkflow extends common_2.BaseWorkf
|
|
|
58
52
|
};
|
|
59
53
|
exports.MeetingNotesWorkflow = MeetingNotesWorkflow;
|
|
60
54
|
__decorate([
|
|
61
|
-
(0,
|
|
55
|
+
(0, common_1.Transition)({ to: 'waiting_for_response' }),
|
|
62
56
|
__metadata("design:type", Function),
|
|
63
57
|
__metadata("design:paramtypes", [Object, Object]),
|
|
64
58
|
__metadata("design:returntype", Promise)
|
|
65
59
|
], MeetingNotesWorkflow.prototype, "createForm", null);
|
|
66
60
|
__decorate([
|
|
67
|
-
(0,
|
|
61
|
+
(0, common_1.Transition)({ from: 'waiting_for_response', to: 'response_received', wait: true, schema: meeting_notes_document_1.MeetingNotesDocumentSchema }),
|
|
68
62
|
__metadata("design:type", Function),
|
|
69
63
|
__metadata("design:paramtypes", [Object, Object]),
|
|
70
64
|
__metadata("design:returntype", Promise)
|
|
71
65
|
], MeetingNotesWorkflow.prototype, "userResponse", null);
|
|
72
66
|
__decorate([
|
|
73
|
-
(0,
|
|
67
|
+
(0, common_1.Transition)({ from: 'response_received', to: 'notes_optimized' }),
|
|
74
68
|
__metadata("design:type", Function),
|
|
75
69
|
__metadata("design:paramtypes", [Object]),
|
|
76
70
|
__metadata("design:returntype", Promise)
|
|
77
71
|
], MeetingNotesWorkflow.prototype, "optimizeNotes", null);
|
|
78
72
|
__decorate([
|
|
79
|
-
(0,
|
|
73
|
+
(0, common_1.Transition)({ from: 'notes_optimized', to: 'end', wait: true, schema: optimized_notes_document_1.OptimizedMeetingNotesDocumentSchema }),
|
|
80
74
|
__metadata("design:type", Function),
|
|
81
75
|
__metadata("design:paramtypes", [Object, Object]),
|
|
82
76
|
__metadata("design:returntype", Promise)
|
|
83
77
|
], MeetingNotesWorkflow.prototype, "confirm", null);
|
|
84
78
|
exports.MeetingNotesWorkflow = MeetingNotesWorkflow = __decorate([
|
|
85
|
-
(0,
|
|
79
|
+
(0, common_1.Workflow)({
|
|
86
80
|
title: 'Human-in-the-loop Demo (Meeting Notes Optimizer)',
|
|
87
81
|
description: 'A demo workflow to demonstrate how to use AI to structure meeting notes.',
|
|
88
82
|
schema: zod_1.z.object({
|
|
@@ -91,7 +85,6 @@ exports.MeetingNotesWorkflow = MeetingNotesWorkflow = __decorate([
|
|
|
91
85
|
.default('- 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'),
|
|
92
86
|
}),
|
|
93
87
|
}),
|
|
94
|
-
|
|
95
|
-
__metadata("design:paramtypes", [llm_provider_module_1.LlmGenerateObjectTool, Function])
|
|
88
|
+
__metadata("design:paramtypes", [llm_provider_module_1.LlmGenerateObjectTool])
|
|
96
89
|
], MeetingNotesWorkflow);
|
|
97
90
|
//# sourceMappingURL=meeting-notes.workflow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meeting-notes.workflow.js","sourceRoot":"","sources":["../src/meeting-notes.workflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meeting-notes.workflow.js","sourceRoot":"","sources":["../src/meeting-notes.workflow.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6BAAwB;AACxB,6BAAmC;AACnC,8CAAuE;AAGvE,wEAAuE;AACvE,+EAAsG;AACtG,mFAAmH;AAkB5G,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,qBAAsD;IACjE;IAA7B,YAA6B,iBAAwC;QACnE,KAAK,EAAE,CAAC;QADmB,sBAAiB,GAAjB,iBAAiB,CAAuB;IAErE,CAAC;IAGK,AAAN,KAAK,CAAC,UAAU,CAAC,KAAwB,EAAE,GAAqB;QAC9D,MAAM,IAAI,GAAG,GAAG,CAAC,IAA6B,CAAC;QAC/C,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAC3B,6CAAoB,EACpB,EAAE,IAAI,EAAE,0BAA0B,IAAI,CAAC,SAAS,EAAE,EAAE,EACpD,EAAE,EAAE,EAAE,OAAO,EAAE,CAChB,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY,CAChB,KAAwB,EACxB,OAAmD;QAEnD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,6CAAoB,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QAC7F,OAAO,EAAE,GAAG,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,OAAqD,EAAE,CAAC;IAClG,CAAC;IAGK,AAAN,KAAK,CAAC,aAAa,CAAC,KAAwB;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAC9C;YACE,YAAY,EAAE,IAAA,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IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,8DAAmC,EAAE,CAAC;;;;mDAO3G;+BAxDU,oBAAoB;IAXhC,IAAA,iBAAQ,EAAC;QACR,KAAK,EAAE,kDAAkD;QACzD,WAAW,EAAE,0EAA0E;QACvF,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,SAAS,EAAE,OAAC;iBACT,MAAM,EAAE;iBACR,OAAO,CACN,2IAA2I,CAC5I;SACJ,CAAC;KACH,CAAC;qCAEgD,2CAAqB;GAD1D,oBAAoB,CAyDhC"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"summary",
|
|
10
10
|
"workflow"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.23.
|
|
12
|
+
"version": "0.23.1",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Jakob Klippel",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@loopstack/claude-module": "^0.25.0",
|
|
34
34
|
"@loopstack/llm-provider-module": "^0.4.0",
|
|
35
|
-
"@loopstack/common": "^0.32.
|
|
35
|
+
"@loopstack/common": "^0.32.1",
|
|
36
36
|
"@nestjs/common": "^11.1.19",
|
|
37
37
|
"zod": "^4.3.6"
|
|
38
38
|
},
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Inject } from '@nestjs/common';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
import { toJSONSchema } from 'zod';
|
|
4
|
-
import { BaseWorkflow,
|
|
5
|
-
import type { LoopstackContext
|
|
3
|
+
import { BaseWorkflow, Transition, Workflow } from '@loopstack/common';
|
|
4
|
+
import type { LoopstackContext } from '@loopstack/common';
|
|
6
5
|
import type { LlmGenerateObjectResult } from '@loopstack/llm-provider-module';
|
|
7
6
|
import { LlmGenerateObjectTool } from '@loopstack/llm-provider-module';
|
|
8
7
|
import { MeetingNotesDocument, MeetingNotesDocumentSchema } from './documents/meeting-notes-document';
|
|
@@ -25,10 +24,7 @@ interface MeetingNotesState {
|
|
|
25
24
|
}),
|
|
26
25
|
})
|
|
27
26
|
export class MeetingNotesWorkflow extends BaseWorkflow<{ inputText: string }, MeetingNotesState> {
|
|
28
|
-
constructor(
|
|
29
|
-
private readonly llmGenerateObject: LlmGenerateObjectTool,
|
|
30
|
-
@Inject(TEMPLATE_RENDERER) private readonly render: TemplateRenderFn,
|
|
31
|
-
) {
|
|
27
|
+
constructor(private readonly llmGenerateObject: LlmGenerateObjectTool) {
|
|
32
28
|
super();
|
|
33
29
|
}
|
|
34
30
|
|