couchloop-eq-mcp 2.0.2 → 2.0.4
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 +11 -12
- package/dist/clients/shrinkChatClient.d.ts +38 -38
- package/dist/db/client.d.ts +11 -19
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +30 -62
- package/dist/db/client.js.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/resources/journey-status.d.ts.map +1 -1
- package/dist/resources/journey-status.js +10 -12
- package/dist/resources/journey-status.js.map +1 -1
- package/dist/resources/session-summary.d.ts.map +1 -1
- package/dist/resources/session-summary.js +33 -33
- package/dist/resources/session-summary.js.map +1 -1
- package/dist/resources/user-context.d.ts.map +1 -1
- package/dist/resources/user-context.js +26 -41
- package/dist/resources/user-context.js.map +1 -1
- package/dist/server/http-mcp.js +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +8 -9
- package/dist/server/index.js.map +1 -1
- package/dist/server/sse.d.ts.map +1 -1
- package/dist/server/sse.js +17 -17
- package/dist/server/sse.js.map +1 -1
- package/dist/tools/check-versions.d.ts +7 -7
- package/dist/tools/checkpoint.d.ts +1 -8
- package/dist/tools/checkpoint.d.ts.map +1 -1
- package/dist/tools/checkpoint.js +47 -49
- package/dist/tools/checkpoint.js.map +1 -1
- package/dist/tools/couchloop-v2.d.ts.map +1 -1
- package/dist/tools/couchloop-v2.js +15 -4
- package/dist/tools/couchloop-v2.js.map +1 -1
- package/dist/tools/detect-build-context.d.ts +1 -1
- package/dist/tools/generate-upgrade-report.d.ts +2 -2
- package/dist/tools/guard.d.ts +3 -3
- package/dist/tools/index.d.ts +2 -4
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/insight.d.ts +10 -49
- package/dist/tools/insight.d.ts.map +1 -1
- package/dist/tools/insight.js +78 -91
- package/dist/tools/insight.js.map +1 -1
- package/dist/tools/intent-router.d.ts.map +1 -1
- package/dist/tools/intent-router.js +12 -7
- package/dist/tools/intent-router.js.map +1 -1
- package/dist/tools/journey.d.ts +5 -5
- package/dist/tools/journey.d.ts.map +1 -1
- package/dist/tools/journey.js +47 -39
- package/dist/tools/journey.js.map +1 -1
- package/dist/tools/pre-review-code.d.ts +2 -2
- package/dist/tools/prevent-ai-errors.d.ts +3 -3
- package/dist/tools/primary-tools.d.ts +37 -190
- package/dist/tools/primary-tools.d.ts.map +1 -1
- package/dist/tools/primary-tools.js +204 -302
- package/dist/tools/primary-tools.js.map +1 -1
- package/dist/tools/protect-files.d.ts +1 -1
- package/dist/tools/sendMessage.d.ts.map +1 -1
- package/dist/tools/sendMessage.js +52 -38
- package/dist/tools/sendMessage.js.map +1 -1
- package/dist/tools/session-manager.d.ts.map +1 -1
- package/dist/tools/session-manager.js +88 -70
- package/dist/tools/session-manager.js.map +1 -1
- package/dist/tools/session.d.ts +7 -86
- package/dist/tools/session.d.ts.map +1 -1
- package/dist/tools/session.js +68 -72
- package/dist/tools/session.js.map +1 -1
- package/dist/tools/smart-context.d.ts +1 -1
- package/dist/tools/status.d.ts +9 -2
- package/dist/tools/status.d.ts.map +1 -1
- package/dist/tools/status.js +113 -64
- package/dist/tools/status.js.map +1 -1
- package/dist/tools/verify.d.ts +4 -4
- package/dist/tools/verify.js.map +1 -1
- package/dist/types/auth.d.ts +2 -2
- package/dist/types/checkpoint.d.ts +4 -4
- package/dist/types/file-protection.d.ts +2 -2
- package/dist/types/insight.d.ts +10 -10
- package/dist/types/journey.d.ts +40 -12
- package/dist/types/journey.d.ts.map +1 -1
- package/dist/types/journey.js +2 -0
- package/dist/types/journey.js.map +1 -1
- package/dist/types/session.d.ts +10 -10
- package/dist/workflows/engine.d.ts +2 -2
- package/dist/workflows/engine.d.ts.map +1 -1
- package/dist/workflows/engine.js +81 -82
- package/dist/workflows/engine.js.map +1 -1
- package/dist/workflows/index.d.ts +4 -4
- package/package.json +2 -10
package/dist/types/journey.d.ts
CHANGED
|
@@ -22,22 +22,22 @@ export declare const JourneyStepSchema: z.ZodObject<{
|
|
|
22
22
|
optional: z.ZodBoolean;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
24
|
id: string;
|
|
25
|
+
type: "prompt" | "checkpoint" | "summary";
|
|
25
26
|
content: {
|
|
26
27
|
prompt?: string | undefined;
|
|
27
28
|
checkpoint_key?: string | undefined;
|
|
28
29
|
instructions?: string | undefined;
|
|
29
30
|
};
|
|
30
|
-
type: "prompt" | "checkpoint" | "summary";
|
|
31
31
|
optional: boolean;
|
|
32
32
|
order: number;
|
|
33
33
|
}, {
|
|
34
34
|
id: string;
|
|
35
|
+
type: "prompt" | "checkpoint" | "summary";
|
|
35
36
|
content: {
|
|
36
37
|
prompt?: string | undefined;
|
|
37
38
|
checkpoint_key?: string | undefined;
|
|
38
39
|
instructions?: string | undefined;
|
|
39
40
|
};
|
|
40
|
-
type: "prompt" | "checkpoint" | "summary";
|
|
41
41
|
optional: boolean;
|
|
42
42
|
order: number;
|
|
43
43
|
}>;
|
|
@@ -67,22 +67,22 @@ export declare const JourneySchema: z.ZodObject<{
|
|
|
67
67
|
optional: z.ZodBoolean;
|
|
68
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
69
|
id: string;
|
|
70
|
+
type: "prompt" | "checkpoint" | "summary";
|
|
70
71
|
content: {
|
|
71
72
|
prompt?: string | undefined;
|
|
72
73
|
checkpoint_key?: string | undefined;
|
|
73
74
|
instructions?: string | undefined;
|
|
74
75
|
};
|
|
75
|
-
type: "prompt" | "checkpoint" | "summary";
|
|
76
76
|
optional: boolean;
|
|
77
77
|
order: number;
|
|
78
78
|
}, {
|
|
79
79
|
id: string;
|
|
80
|
+
type: "prompt" | "checkpoint" | "summary";
|
|
80
81
|
content: {
|
|
81
82
|
prompt?: string | undefined;
|
|
82
83
|
checkpoint_key?: string | undefined;
|
|
83
84
|
instructions?: string | undefined;
|
|
84
85
|
};
|
|
85
|
-
type: "prompt" | "checkpoint" | "summary";
|
|
86
86
|
optional: boolean;
|
|
87
87
|
order: number;
|
|
88
88
|
}>, "many">;
|
|
@@ -90,39 +90,39 @@ export declare const JourneySchema: z.ZodObject<{
|
|
|
90
90
|
tags: z.ZodArray<z.ZodString, "many">;
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
92
|
name: string;
|
|
93
|
-
slug: string;
|
|
94
|
-
description: string;
|
|
95
93
|
steps: {
|
|
96
94
|
id: string;
|
|
95
|
+
type: "prompt" | "checkpoint" | "summary";
|
|
97
96
|
content: {
|
|
98
97
|
prompt?: string | undefined;
|
|
99
98
|
checkpoint_key?: string | undefined;
|
|
100
99
|
instructions?: string | undefined;
|
|
101
100
|
};
|
|
102
|
-
type: "prompt" | "checkpoint" | "summary";
|
|
103
101
|
optional: boolean;
|
|
104
102
|
order: number;
|
|
105
103
|
}[];
|
|
106
|
-
|
|
104
|
+
slug: string;
|
|
107
105
|
tags: string[];
|
|
106
|
+
description: string;
|
|
107
|
+
estimatedMinutes: number;
|
|
108
108
|
id?: string | undefined;
|
|
109
109
|
}, {
|
|
110
110
|
name: string;
|
|
111
|
-
slug: string;
|
|
112
|
-
description: string;
|
|
113
111
|
steps: {
|
|
114
112
|
id: string;
|
|
113
|
+
type: "prompt" | "checkpoint" | "summary";
|
|
115
114
|
content: {
|
|
116
115
|
prompt?: string | undefined;
|
|
117
116
|
checkpoint_key?: string | undefined;
|
|
118
117
|
instructions?: string | undefined;
|
|
119
118
|
};
|
|
120
|
-
type: "prompt" | "checkpoint" | "summary";
|
|
121
119
|
optional: boolean;
|
|
122
120
|
order: number;
|
|
123
121
|
}[];
|
|
124
|
-
|
|
122
|
+
slug: string;
|
|
125
123
|
tags: string[];
|
|
124
|
+
description: string;
|
|
125
|
+
estimatedMinutes: number;
|
|
126
126
|
id?: string | undefined;
|
|
127
127
|
}>;
|
|
128
128
|
export type Journey = z.infer<typeof JourneySchema>;
|
|
@@ -136,10 +136,38 @@ export declare const ListJourneysSchema: z.ZodObject<{
|
|
|
136
136
|
export type ListJourneysInput = z.infer<typeof ListJourneysSchema>;
|
|
137
137
|
export declare const GetJourneyStatusSchema: z.ZodObject<{
|
|
138
138
|
session_id: z.ZodString;
|
|
139
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
token: z.ZodOptional<z.ZodString>;
|
|
141
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
142
|
+
client_id: z.ZodOptional<z.ZodString>;
|
|
143
|
+
conversation_id: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
user_id?: string | undefined;
|
|
146
|
+
token?: string | undefined;
|
|
147
|
+
client_id?: string | undefined;
|
|
148
|
+
conversation_id?: string | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
user_id?: string | undefined;
|
|
151
|
+
token?: string | undefined;
|
|
152
|
+
client_id?: string | undefined;
|
|
153
|
+
conversation_id?: string | undefined;
|
|
154
|
+
}>>;
|
|
139
155
|
}, "strip", z.ZodTypeAny, {
|
|
140
156
|
session_id: string;
|
|
157
|
+
auth?: {
|
|
158
|
+
user_id?: string | undefined;
|
|
159
|
+
token?: string | undefined;
|
|
160
|
+
client_id?: string | undefined;
|
|
161
|
+
conversation_id?: string | undefined;
|
|
162
|
+
} | undefined;
|
|
141
163
|
}, {
|
|
142
164
|
session_id: string;
|
|
165
|
+
auth?: {
|
|
166
|
+
user_id?: string | undefined;
|
|
167
|
+
token?: string | undefined;
|
|
168
|
+
client_id?: string | undefined;
|
|
169
|
+
conversation_id?: string | undefined;
|
|
170
|
+
} | undefined;
|
|
143
171
|
}>;
|
|
144
172
|
export type GetJourneyStatusInput = z.infer<typeof GetJourneyStatusSchema>;
|
|
145
173
|
export interface JourneyStatusResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../src/types/journey.ts"],"names":[],"mappings":"AAAA,O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EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;CAC9B"}
|
package/dist/types/journey.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { AuthContextSchema } from './auth.js';
|
|
2
3
|
export const JourneyStepTypeSchema = z.enum(['prompt', 'checkpoint', 'summary']);
|
|
3
4
|
export const JourneyStepSchema = z.object({
|
|
4
5
|
id: z.string(),
|
|
@@ -25,5 +26,6 @@ export const ListJourneysSchema = z.object({
|
|
|
25
26
|
});
|
|
26
27
|
export const GetJourneyStatusSchema = z.object({
|
|
27
28
|
session_id: z.string().uuid().describe('Session ID to check'),
|
|
29
|
+
auth: AuthContextSchema.optional().describe('Authentication context'),
|
|
28
30
|
});
|
|
29
31
|
//# sourceMappingURL=journey.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey.js","sourceRoot":"","sources":["../../src/types/journey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"journey.js","sourceRoot":"","sources":["../../src/types/journey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,CAAC;AAGjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,qBAA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const CreateSessionSchema: z.ZodObject<{
|
|
|
12
12
|
conversation_id: z.ZodOptional<z.ZodString>;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
user_id?: string | undefined;
|
|
15
|
-
client_id?: string | undefined;
|
|
16
15
|
token?: string | undefined;
|
|
16
|
+
client_id?: string | undefined;
|
|
17
17
|
conversation_id?: string | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
user_id?: string | undefined;
|
|
20
|
-
client_id?: string | undefined;
|
|
21
20
|
token?: string | undefined;
|
|
21
|
+
client_id?: string | undefined;
|
|
22
22
|
conversation_id?: string | undefined;
|
|
23
23
|
}>>;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
context?: string | undefined;
|
|
26
25
|
auth?: {
|
|
27
26
|
user_id?: string | undefined;
|
|
28
|
-
client_id?: string | undefined;
|
|
29
27
|
token?: string | undefined;
|
|
28
|
+
client_id?: string | undefined;
|
|
30
29
|
conversation_id?: string | undefined;
|
|
31
30
|
} | undefined;
|
|
32
31
|
journey_slug?: string | undefined;
|
|
33
|
-
}, {
|
|
34
32
|
context?: string | undefined;
|
|
33
|
+
}, {
|
|
35
34
|
auth?: {
|
|
36
35
|
user_id?: string | undefined;
|
|
37
|
-
client_id?: string | undefined;
|
|
38
36
|
token?: string | undefined;
|
|
37
|
+
client_id?: string | undefined;
|
|
39
38
|
conversation_id?: string | undefined;
|
|
40
39
|
} | undefined;
|
|
41
40
|
journey_slug?: string | undefined;
|
|
41
|
+
context?: string | undefined;
|
|
42
42
|
}>;
|
|
43
43
|
export type CreateSessionInput = z.infer<typeof CreateSessionSchema>;
|
|
44
44
|
export declare const ResumeSessionSchema: z.ZodObject<{
|
|
@@ -50,29 +50,29 @@ export declare const ResumeSessionSchema: z.ZodObject<{
|
|
|
50
50
|
conversation_id: z.ZodOptional<z.ZodString>;
|
|
51
51
|
}, "strip", z.ZodTypeAny, {
|
|
52
52
|
user_id?: string | undefined;
|
|
53
|
-
client_id?: string | undefined;
|
|
54
53
|
token?: string | undefined;
|
|
54
|
+
client_id?: string | undefined;
|
|
55
55
|
conversation_id?: string | undefined;
|
|
56
56
|
}, {
|
|
57
57
|
user_id?: string | undefined;
|
|
58
|
-
client_id?: string | undefined;
|
|
59
58
|
token?: string | undefined;
|
|
59
|
+
client_id?: string | undefined;
|
|
60
60
|
conversation_id?: string | undefined;
|
|
61
61
|
}>>;
|
|
62
62
|
}, "strip", z.ZodTypeAny, {
|
|
63
63
|
session_id?: string | undefined;
|
|
64
64
|
auth?: {
|
|
65
65
|
user_id?: string | undefined;
|
|
66
|
-
client_id?: string | undefined;
|
|
67
66
|
token?: string | undefined;
|
|
67
|
+
client_id?: string | undefined;
|
|
68
68
|
conversation_id?: string | undefined;
|
|
69
69
|
} | undefined;
|
|
70
70
|
}, {
|
|
71
71
|
session_id?: string | undefined;
|
|
72
72
|
auth?: {
|
|
73
73
|
user_id?: string | undefined;
|
|
74
|
-
client_id?: string | undefined;
|
|
75
74
|
token?: string | undefined;
|
|
75
|
+
client_id?: string | undefined;
|
|
76
76
|
conversation_id?: string | undefined;
|
|
77
77
|
} | undefined;
|
|
78
78
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JourneyStep } from '../types/journey.js';
|
|
2
2
|
export declare class WorkflowEngine {
|
|
3
|
-
private
|
|
4
|
-
private get
|
|
3
|
+
private _supabase;
|
|
4
|
+
private get supabase();
|
|
5
5
|
initializeSession(userId: string, journeyId: string): Promise<string>;
|
|
6
6
|
getCurrentStep(sessionId: string): Promise<JourneyStep | null>;
|
|
7
7
|
advanceStep(sessionId: string): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/workflows/engine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/workflows/engine.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,qBAAa,cAAc;IACzB,OAAO,CAAC,SAAS,CAA+B;IAEhD,OAAO,KAAK,QAAQ,GAKnB;IAEK,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAmBrE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IA4B9D,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAC5C,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IA8DI,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAc9C,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAchD,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QACnD,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IAoDI,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAI9D;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
|
package/dist/workflows/engine.js
CHANGED
|
@@ -1,118 +1,117 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { sessions, journeys, checkpoints } from '../db/schema.js';
|
|
3
|
-
import { eq } from 'drizzle-orm';
|
|
1
|
+
import { getSupabaseClient, throwOnError } from '../db/supabase-helpers.js';
|
|
4
2
|
import { logger } from '../utils/logger.js';
|
|
5
3
|
export class WorkflowEngine {
|
|
6
|
-
|
|
7
|
-
get
|
|
8
|
-
if (!this.
|
|
9
|
-
this.
|
|
4
|
+
_supabase = null;
|
|
5
|
+
get supabase() {
|
|
6
|
+
if (!this._supabase) {
|
|
7
|
+
this._supabase = getSupabaseClient();
|
|
10
8
|
}
|
|
11
|
-
return this.
|
|
9
|
+
return this._supabase;
|
|
12
10
|
}
|
|
13
11
|
async initializeSession(userId, journeyId) {
|
|
14
|
-
const sessionResult = await this.
|
|
15
|
-
.
|
|
16
|
-
.
|
|
17
|
-
userId,
|
|
18
|
-
journeyId,
|
|
12
|
+
const sessionResult = throwOnError(await this.supabase
|
|
13
|
+
.from('sessions')
|
|
14
|
+
.insert({
|
|
15
|
+
user_id: userId,
|
|
16
|
+
journey_id: journeyId,
|
|
19
17
|
status: 'active',
|
|
20
|
-
|
|
18
|
+
current_step: 0,
|
|
21
19
|
metadata: {},
|
|
22
20
|
})
|
|
23
|
-
.
|
|
24
|
-
const session = sessionResult[0];
|
|
21
|
+
.select());
|
|
22
|
+
const session = (sessionResult ?? [])[0];
|
|
25
23
|
logger.info(`Initialized session ${session.id} for journey ${journeyId}`);
|
|
26
24
|
return session.id;
|
|
27
25
|
}
|
|
28
26
|
async getCurrentStep(sessionId) {
|
|
29
|
-
const
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
.
|
|
33
|
-
.
|
|
34
|
-
if (!session || !session.
|
|
27
|
+
const session = throwOnError(await this.supabase
|
|
28
|
+
.from('sessions')
|
|
29
|
+
.select('*')
|
|
30
|
+
.eq('id', sessionId)
|
|
31
|
+
.maybeSingle());
|
|
32
|
+
if (!session || !session.journey_id) {
|
|
35
33
|
return null;
|
|
36
34
|
}
|
|
37
|
-
const
|
|
38
|
-
.
|
|
39
|
-
.
|
|
40
|
-
.
|
|
41
|
-
.
|
|
35
|
+
const journey = throwOnError(await this.supabase
|
|
36
|
+
.from('journeys')
|
|
37
|
+
.select('*')
|
|
38
|
+
.eq('id', session.journey_id)
|
|
39
|
+
.maybeSingle());
|
|
42
40
|
if (!journey || !journey.steps) {
|
|
43
41
|
return null;
|
|
44
42
|
}
|
|
45
|
-
return journey.steps[session.
|
|
43
|
+
return journey.steps[session.current_step] ?? null;
|
|
46
44
|
}
|
|
47
45
|
async advanceStep(sessionId) {
|
|
48
|
-
const
|
|
49
|
-
.
|
|
50
|
-
.
|
|
51
|
-
.
|
|
52
|
-
.
|
|
53
|
-
if (!session || !session.
|
|
46
|
+
const session = throwOnError(await this.supabase
|
|
47
|
+
.from('sessions')
|
|
48
|
+
.select('*')
|
|
49
|
+
.eq('id', sessionId)
|
|
50
|
+
.maybeSingle());
|
|
51
|
+
if (!session || !session.journey_id) {
|
|
54
52
|
return { nextStep: null, isComplete: false };
|
|
55
53
|
}
|
|
56
|
-
const
|
|
57
|
-
.
|
|
58
|
-
.
|
|
59
|
-
.
|
|
60
|
-
.
|
|
54
|
+
const journey = throwOnError(await this.supabase
|
|
55
|
+
.from('journeys')
|
|
56
|
+
.select('*')
|
|
57
|
+
.eq('id', session.journey_id)
|
|
58
|
+
.maybeSingle());
|
|
61
59
|
if (!journey || !journey.steps) {
|
|
62
60
|
return { nextStep: null, isComplete: false };
|
|
63
61
|
}
|
|
64
|
-
const
|
|
65
|
-
|
|
62
|
+
const steps = journey.steps;
|
|
63
|
+
const nextStepIndex = session.current_step + 1;
|
|
64
|
+
if (nextStepIndex >= steps.length) {
|
|
66
65
|
// Journey is complete
|
|
67
|
-
await this.
|
|
68
|
-
.
|
|
69
|
-
.
|
|
66
|
+
throwOnError(await this.supabase
|
|
67
|
+
.from('sessions')
|
|
68
|
+
.update({
|
|
70
69
|
status: 'completed',
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
completed_at: new Date().toISOString(),
|
|
71
|
+
last_active_at: new Date().toISOString(),
|
|
73
72
|
})
|
|
74
|
-
.
|
|
73
|
+
.eq('id', sessionId));
|
|
75
74
|
logger.info(`Session ${sessionId} completed`);
|
|
76
75
|
return { nextStep: null, isComplete: true };
|
|
77
76
|
}
|
|
78
77
|
// Advance to next step
|
|
79
|
-
await this.
|
|
80
|
-
.
|
|
81
|
-
.
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
throwOnError(await this.supabase
|
|
79
|
+
.from('sessions')
|
|
80
|
+
.update({
|
|
81
|
+
current_step: nextStepIndex,
|
|
82
|
+
last_active_at: new Date().toISOString(),
|
|
84
83
|
})
|
|
85
|
-
.
|
|
86
|
-
const nextStep =
|
|
84
|
+
.eq('id', sessionId));
|
|
85
|
+
const nextStep = steps[nextStepIndex] ?? null;
|
|
87
86
|
logger.info(`Session ${sessionId} advanced to step ${nextStepIndex}`);
|
|
88
87
|
return { nextStep, isComplete: false };
|
|
89
88
|
}
|
|
90
89
|
async pauseSession(sessionId) {
|
|
91
|
-
await this.
|
|
92
|
-
.
|
|
93
|
-
.
|
|
90
|
+
throwOnError(await this.supabase
|
|
91
|
+
.from('sessions')
|
|
92
|
+
.update({
|
|
94
93
|
status: 'paused',
|
|
95
|
-
|
|
94
|
+
last_active_at: new Date().toISOString(),
|
|
96
95
|
})
|
|
97
|
-
.
|
|
96
|
+
.eq('id', sessionId));
|
|
98
97
|
logger.info(`Session ${sessionId} paused`);
|
|
99
98
|
}
|
|
100
99
|
async abandonSession(sessionId) {
|
|
101
|
-
await this.
|
|
102
|
-
.
|
|
103
|
-
.
|
|
100
|
+
throwOnError(await this.supabase
|
|
101
|
+
.from('sessions')
|
|
102
|
+
.update({
|
|
104
103
|
status: 'abandoned',
|
|
105
|
-
|
|
104
|
+
last_active_at: new Date().toISOString(),
|
|
106
105
|
})
|
|
107
|
-
.
|
|
106
|
+
.eq('id', sessionId));
|
|
108
107
|
logger.info(`Session ${sessionId} abandoned`);
|
|
109
108
|
}
|
|
110
109
|
async getSessionProgress(sessionId) {
|
|
111
|
-
const
|
|
112
|
-
.
|
|
113
|
-
.
|
|
114
|
-
.
|
|
115
|
-
.
|
|
110
|
+
const session = throwOnError(await this.supabase
|
|
111
|
+
.from('sessions')
|
|
112
|
+
.select('*')
|
|
113
|
+
.eq('id', sessionId)
|
|
114
|
+
.maybeSingle());
|
|
116
115
|
if (!session) {
|
|
117
116
|
return {
|
|
118
117
|
currentStep: 0,
|
|
@@ -122,28 +121,28 @@ export class WorkflowEngine {
|
|
|
122
121
|
};
|
|
123
122
|
}
|
|
124
123
|
let totalSteps = 0;
|
|
125
|
-
if (session.
|
|
126
|
-
const
|
|
127
|
-
.
|
|
128
|
-
.
|
|
129
|
-
.
|
|
130
|
-
.
|
|
124
|
+
if (session.journey_id) {
|
|
125
|
+
const journey = throwOnError(await this.supabase
|
|
126
|
+
.from('journeys')
|
|
127
|
+
.select('*')
|
|
128
|
+
.eq('id', session.journey_id)
|
|
129
|
+
.maybeSingle());
|
|
131
130
|
if (journey && journey.steps) {
|
|
132
131
|
totalSteps = journey.steps.length;
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
|
-
const sessionCheckpoints = await this.
|
|
136
|
-
.
|
|
137
|
-
.
|
|
138
|
-
.
|
|
134
|
+
const sessionCheckpoints = throwOnError(await this.supabase
|
|
135
|
+
.from('checkpoints')
|
|
136
|
+
.select('id')
|
|
137
|
+
.eq('session_id', sessionId));
|
|
139
138
|
const percentComplete = totalSteps > 0
|
|
140
|
-
? Math.round((session.
|
|
139
|
+
? Math.round((session.current_step / totalSteps) * 100)
|
|
141
140
|
: 0;
|
|
142
141
|
return {
|
|
143
|
-
currentStep: session.
|
|
142
|
+
currentStep: session.current_step,
|
|
144
143
|
totalSteps,
|
|
145
144
|
percentComplete,
|
|
146
|
-
checkpointCount: sessionCheckpoints.length,
|
|
145
|
+
checkpointCount: (sessionCheckpoints ?? []).length,
|
|
147
146
|
};
|
|
148
147
|
}
|
|
149
148
|
async canSkipCurrentStep(sessionId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/workflows/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/workflows/engine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG5E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IAAI,CAAC,QAAQ;aAChB,IAAI,CAAC,aAAa,CAAC;aACnB,MAAM,CAAC,IAAI,CAAC;aACZ,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,CAC/B,CAAC;QAEF,MAAM,eAAe,GAAG,UAAU,GAAG,CAAC;YACpC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,UAAU,CAAC,GAAG,GAAG,CAAC;YACvD,CAAC,CAAC,CAAC,CAAC;QAEN,OAAO;YACL,WAAW,EAAE,OAAO,CAAC,YAAY;YACjC,UAAU;YACV,eAAe;YACf,eAAe,EAAE,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,MAAM;SACnD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,SAAiB;QACxC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QACzD,OAAO,WAAW,EAAE,QAAQ,IAAI,KAAK,CAAC;IACxC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -5,21 +5,21 @@ import { Journey } from '../types/journey.js';
|
|
|
5
5
|
export declare const journeyDefinitions: Journey[];
|
|
6
6
|
export declare const journeysBySlug: Map<string, {
|
|
7
7
|
name: string;
|
|
8
|
-
slug: string;
|
|
9
|
-
description: string;
|
|
10
8
|
steps: {
|
|
11
9
|
id: string;
|
|
10
|
+
type: "prompt" | "checkpoint" | "summary";
|
|
12
11
|
content: {
|
|
13
12
|
prompt?: string | undefined;
|
|
14
13
|
checkpoint_key?: string | undefined;
|
|
15
14
|
instructions?: string | undefined;
|
|
16
15
|
};
|
|
17
|
-
type: "prompt" | "checkpoint" | "summary";
|
|
18
16
|
optional: boolean;
|
|
19
17
|
order: number;
|
|
20
18
|
}[];
|
|
21
|
-
|
|
19
|
+
slug: string;
|
|
22
20
|
tags: string[];
|
|
21
|
+
description: string;
|
|
22
|
+
estimatedMinutes: number;
|
|
23
23
|
id?: string | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
export { dailyReflection, gratitudePractice, weeklyReview };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "couchloop-eq-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Behavioral governance layer for LLMs - monitors for hallucination, inconsistency, tone drift, and unsafe reasoning while managing stateful AI sessions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -53,13 +53,9 @@
|
|
|
53
53
|
"typecheck": "tsc --noEmit",
|
|
54
54
|
"traces": "echo 'OpenTelemetry traces available at http://localhost:16686' && open http://localhost:16686",
|
|
55
55
|
"metrics": "echo 'Metrics dashboard available at http://localhost:3000' && open http://localhost:3000",
|
|
56
|
-
"db:generate": "drizzle-kit generate:pg",
|
|
57
|
-
"db:push": "drizzle-kit push:pg",
|
|
58
|
-
"db:migrate": "tsx src/db/migrate.ts",
|
|
59
56
|
"db:seed": "tsx src/db/seed.ts",
|
|
60
|
-
"db:studio": "drizzle-kit studio",
|
|
61
57
|
"setup": "npm install && npm run build",
|
|
62
|
-
"setup:db": "npm run db:
|
|
58
|
+
"setup:db": "npm run db:seed",
|
|
63
59
|
"vercel": "vercel",
|
|
64
60
|
"vercel:prod": "vercel --prod",
|
|
65
61
|
"server": "tsx src/server/index.ts",
|
|
@@ -119,14 +115,11 @@
|
|
|
119
115
|
"bcryptjs": "^3.0.3",
|
|
120
116
|
"cookie-parser": "^1.4.7",
|
|
121
117
|
"dotenv": "^16.3.1",
|
|
122
|
-
"drizzle-orm": "^0.29.1",
|
|
123
118
|
"express": "^5.2.1",
|
|
124
119
|
"helmet": "^8.1.0",
|
|
125
120
|
"jose": "^5.2.0",
|
|
126
121
|
"jsonwebtoken": "^9.0.3",
|
|
127
122
|
"nanoid": "^5.0.4",
|
|
128
|
-
"pg": "^8.16.3",
|
|
129
|
-
"postgres": "^3.4.3",
|
|
130
123
|
"uuid": "^13.0.0",
|
|
131
124
|
"zod": "^3.22.4"
|
|
132
125
|
},
|
|
@@ -140,7 +133,6 @@
|
|
|
140
133
|
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
|
141
134
|
"@typescript-eslint/parser": "^6.15.0",
|
|
142
135
|
"@vercel/node": "^3.0.0",
|
|
143
|
-
"drizzle-kit": "^0.31.8",
|
|
144
136
|
"eslint": "^8.56.0",
|
|
145
137
|
"tsx": "^4.6.2",
|
|
146
138
|
"typescript": "^5.3.3",
|