@valuya/bot-channel-core 0.2.0-beta.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/LICENSE +21 -0
- package/README.md +12 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.js +278 -0
- package/package.json +30 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Valuya
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# @valuya/bot-channel-core
|
|
2
|
+
|
|
3
|
+
Shared helpers for gated bot-channel packages.
|
|
4
|
+
|
|
5
|
+
This package holds the channel-agnostic pieces that both WhatsApp and Telegram
|
|
6
|
+
bot-channel examples need:
|
|
7
|
+
|
|
8
|
+
- schema-driven soul runtime
|
|
9
|
+
- file-backed soul memory
|
|
10
|
+
- mentor soul helper
|
|
11
|
+
- support soul helper
|
|
12
|
+
- concierge soul helper
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export type SoulResponseSchema = {
|
|
2
|
+
format: "json";
|
|
3
|
+
replyKey: string;
|
|
4
|
+
followUpQuestionKey?: string;
|
|
5
|
+
followUpQuestionsKey?: string;
|
|
6
|
+
nextStepKey?: string;
|
|
7
|
+
summaryKey?: string;
|
|
8
|
+
userProfileKey?: string;
|
|
9
|
+
rootPatternKey?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ChannelSoulDefinition = {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
systemPrompt: string;
|
|
15
|
+
locale?: string;
|
|
16
|
+
memoryPolicy?: {
|
|
17
|
+
keepRecentTurns: number;
|
|
18
|
+
summarizeAfterTurns: number;
|
|
19
|
+
};
|
|
20
|
+
tools?: string[];
|
|
21
|
+
responseSchema?: SoulResponseSchema;
|
|
22
|
+
};
|
|
23
|
+
export type SoulMemoryTurn = {
|
|
24
|
+
role: "user" | "assistant";
|
|
25
|
+
content: string;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
};
|
|
28
|
+
export type SoulMemory = {
|
|
29
|
+
recentTurns: SoulMemoryTurn[];
|
|
30
|
+
summaries: string[];
|
|
31
|
+
userProfile?: Record<string, unknown>;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
};
|
|
34
|
+
export type SoulResponse = {
|
|
35
|
+
reply: string;
|
|
36
|
+
memory?: SoulMemory;
|
|
37
|
+
metadata?: Record<string, unknown>;
|
|
38
|
+
};
|
|
39
|
+
export type StructuredCompletionResult = string | SoulResponse | Record<string, unknown>;
|
|
40
|
+
export type StructuredCompletionRunner = (args: {
|
|
41
|
+
system: string;
|
|
42
|
+
user: string;
|
|
43
|
+
locale?: string;
|
|
44
|
+
soul: ChannelSoulDefinition;
|
|
45
|
+
schema?: SoulResponseSchema;
|
|
46
|
+
}) => Promise<StructuredCompletionResult>;
|
|
47
|
+
export type SoulRuntimeLike = {
|
|
48
|
+
run(args: {
|
|
49
|
+
soul: ChannelSoulDefinition;
|
|
50
|
+
message: string;
|
|
51
|
+
memory: SoulMemory;
|
|
52
|
+
protocolSubjectHeader: string;
|
|
53
|
+
locale?: string;
|
|
54
|
+
}): Promise<SoulResponse>;
|
|
55
|
+
};
|
|
56
|
+
export declare class SchemaDrivenSoulRuntime implements SoulRuntimeLike {
|
|
57
|
+
private readonly deps;
|
|
58
|
+
constructor(deps: {
|
|
59
|
+
runCompletion: StructuredCompletionRunner;
|
|
60
|
+
});
|
|
61
|
+
run(args: {
|
|
62
|
+
soul: ChannelSoulDefinition;
|
|
63
|
+
message: string;
|
|
64
|
+
memory: SoulMemory;
|
|
65
|
+
protocolSubjectHeader: string;
|
|
66
|
+
locale?: string;
|
|
67
|
+
}): Promise<SoulResponse>;
|
|
68
|
+
}
|
|
69
|
+
export declare class FileSoulMemoryStore {
|
|
70
|
+
private readonly filePath;
|
|
71
|
+
constructor(filePath: string);
|
|
72
|
+
load(args: {
|
|
73
|
+
userId?: string;
|
|
74
|
+
whatsappUserId?: string;
|
|
75
|
+
telegramUserId?: string;
|
|
76
|
+
soulId: string;
|
|
77
|
+
}): Promise<SoulMemory>;
|
|
78
|
+
save(args: {
|
|
79
|
+
userId?: string;
|
|
80
|
+
whatsappUserId?: string;
|
|
81
|
+
telegramUserId?: string;
|
|
82
|
+
soulId: string;
|
|
83
|
+
memory: SoulMemory;
|
|
84
|
+
}): Promise<void>;
|
|
85
|
+
private key;
|
|
86
|
+
private readState;
|
|
87
|
+
}
|
|
88
|
+
export declare function createMentorSoulDefinition(args?: {
|
|
89
|
+
id?: string;
|
|
90
|
+
name?: string;
|
|
91
|
+
locale?: string;
|
|
92
|
+
systemPrompt?: string;
|
|
93
|
+
}): ChannelSoulDefinition;
|
|
94
|
+
export declare function createSupportSoulDefinition(args?: {
|
|
95
|
+
id?: string;
|
|
96
|
+
name?: string;
|
|
97
|
+
locale?: string;
|
|
98
|
+
systemPrompt?: string;
|
|
99
|
+
}): ChannelSoulDefinition;
|
|
100
|
+
export declare function createConciergeSoulDefinition(args?: {
|
|
101
|
+
id?: string;
|
|
102
|
+
name?: string;
|
|
103
|
+
locale?: string;
|
|
104
|
+
systemPrompt?: string;
|
|
105
|
+
}): ChannelSoulDefinition;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
export class SchemaDrivenSoulRuntime {
|
|
4
|
+
deps;
|
|
5
|
+
constructor(deps) {
|
|
6
|
+
this.deps = deps;
|
|
7
|
+
}
|
|
8
|
+
async run(args) {
|
|
9
|
+
const schema = args.soul.responseSchema;
|
|
10
|
+
const result = await this.deps.runCompletion({
|
|
11
|
+
system: buildSystemPrompt(args.soul, schema, args.locale),
|
|
12
|
+
user: buildUserPrompt(args.message, args.memory, args.protocolSubjectHeader),
|
|
13
|
+
locale: args.locale || args.soul.locale,
|
|
14
|
+
soul: args.soul,
|
|
15
|
+
schema,
|
|
16
|
+
});
|
|
17
|
+
const normalized = normalizeCompletionResult(result, schema);
|
|
18
|
+
return {
|
|
19
|
+
reply: normalized.reply,
|
|
20
|
+
memory: mergeMemory({
|
|
21
|
+
memory: args.memory,
|
|
22
|
+
userMessage: args.message,
|
|
23
|
+
assistantReply: normalized.reply,
|
|
24
|
+
schema,
|
|
25
|
+
payload: normalized.payload,
|
|
26
|
+
}),
|
|
27
|
+
metadata: normalized.payload || undefined,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export class FileSoulMemoryStore {
|
|
32
|
+
filePath;
|
|
33
|
+
constructor(filePath) {
|
|
34
|
+
this.filePath = filePath;
|
|
35
|
+
}
|
|
36
|
+
async load(args) {
|
|
37
|
+
const state = await this.readState();
|
|
38
|
+
return state[this.key(args)] || emptyMemory();
|
|
39
|
+
}
|
|
40
|
+
async save(args) {
|
|
41
|
+
const state = await this.readState();
|
|
42
|
+
state[this.key(args)] = args.memory;
|
|
43
|
+
await mkdir(path.dirname(this.filePath), { recursive: true });
|
|
44
|
+
await writeFile(this.filePath, JSON.stringify(state, null, 2), "utf8");
|
|
45
|
+
}
|
|
46
|
+
key(args) {
|
|
47
|
+
const userId = readString(args.userId)
|
|
48
|
+
|| readString(args.whatsappUserId)
|
|
49
|
+
|| readString(args.telegramUserId)
|
|
50
|
+
|| "unknown";
|
|
51
|
+
return `${userId}::${String(args.soulId).trim()}`;
|
|
52
|
+
}
|
|
53
|
+
async readState() {
|
|
54
|
+
try {
|
|
55
|
+
const raw = await readFile(this.filePath, "utf8");
|
|
56
|
+
const parsed = JSON.parse(raw);
|
|
57
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (error?.code === "ENOENT")
|
|
61
|
+
return {};
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export function createMentorSoulDefinition(args) {
|
|
67
|
+
return {
|
|
68
|
+
id: args?.id || "mentor",
|
|
69
|
+
name: args?.name || "Mentor",
|
|
70
|
+
locale: args?.locale || "de",
|
|
71
|
+
systemPrompt: args?.systemPrompt || [
|
|
72
|
+
"Du bist ein ganzheitlicher Mentor fuer persoenliches Wachstum.",
|
|
73
|
+
"Du antwortest ruhig, klar, praezise und menschlich.",
|
|
74
|
+
"Du hilfst dem Nutzer, Muster zu erkennen, die eigentliche Frage zu schaerfen und einen hilfreichen naechsten Schritt zu sehen.",
|
|
75
|
+
"Du stellst lieber eine gute weiterfuehrende Frage als vorschnell allgemeine Ratschlaege zu geben.",
|
|
76
|
+
"Du vermeidest Floskeln, Pathos und leere Motivation.",
|
|
77
|
+
"Deine Antworten sollen sich natuerlich wie ein hilfreicher, aufmerksamer Mentor anfuehlen.",
|
|
78
|
+
].join(" "),
|
|
79
|
+
responseSchema: {
|
|
80
|
+
format: "json",
|
|
81
|
+
replyKey: "mentor_reply",
|
|
82
|
+
followUpQuestionKey: "deep_question",
|
|
83
|
+
followUpQuestionsKey: "follow_up_questions",
|
|
84
|
+
nextStepKey: "next_step",
|
|
85
|
+
summaryKey: "conversation_summary",
|
|
86
|
+
userProfileKey: "user_profile",
|
|
87
|
+
rootPatternKey: "root_pattern",
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export function createSupportSoulDefinition(args) {
|
|
92
|
+
return {
|
|
93
|
+
id: args?.id || "support",
|
|
94
|
+
name: args?.name || "Support",
|
|
95
|
+
locale: args?.locale || "de",
|
|
96
|
+
systemPrompt: args?.systemPrompt || [
|
|
97
|
+
"Du bist ein ruhiger, klarer Premium-Support-Assistent.",
|
|
98
|
+
"Du hilfst dem Nutzer, sein Problem strukturiert zu beschreiben, das eigentliche Hindernis zu erkennen und den naechsten sinnvollen Schritt zu sehen.",
|
|
99
|
+
"Du antwortest freundlich, konkret und ohne Support-Floskeln.",
|
|
100
|
+
"Wenn etwas unklar ist, stellst du genau eine gute Rueckfrage statt viele auf einmal.",
|
|
101
|
+
"Du formulierst so, dass sich die Hilfe natuerlich und menschlich anfuehlt.",
|
|
102
|
+
].join(" "),
|
|
103
|
+
responseSchema: {
|
|
104
|
+
format: "json",
|
|
105
|
+
replyKey: "support_reply",
|
|
106
|
+
followUpQuestionKey: "clarifying_question",
|
|
107
|
+
nextStepKey: "next_step",
|
|
108
|
+
summaryKey: "case_summary",
|
|
109
|
+
userProfileKey: "customer_context",
|
|
110
|
+
rootPatternKey: "issue_pattern",
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export function createConciergeSoulDefinition(args) {
|
|
115
|
+
return {
|
|
116
|
+
id: args?.id || "concierge",
|
|
117
|
+
name: args?.name || "Concierge",
|
|
118
|
+
locale: args?.locale || "de",
|
|
119
|
+
systemPrompt: args?.systemPrompt || [
|
|
120
|
+
"Du bist ein persoenlicher Premium-Concierge.",
|
|
121
|
+
"Du antwortest aufmerksam, diskret, loesungsorientiert und natuerlich.",
|
|
122
|
+
"Du hilfst dem Nutzer, seinen Wunsch klarer zu machen, passende Optionen zu erkennen und mit wenig Aufwand weiterzukommen.",
|
|
123
|
+
"Du stellst gezielte Rueckfragen, wenn sie wirklich helfen, und gibst am Ende eine klare Empfehlung oder einen naechsten Schritt.",
|
|
124
|
+
].join(" "),
|
|
125
|
+
responseSchema: {
|
|
126
|
+
format: "json",
|
|
127
|
+
replyKey: "concierge_reply",
|
|
128
|
+
followUpQuestionKey: "clarifying_question",
|
|
129
|
+
followUpQuestionsKey: "option_questions",
|
|
130
|
+
nextStepKey: "recommended_next_step",
|
|
131
|
+
summaryKey: "preference_summary",
|
|
132
|
+
userProfileKey: "user_preferences",
|
|
133
|
+
rootPatternKey: "decision_style",
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
function emptyMemory() {
|
|
138
|
+
return {
|
|
139
|
+
recentTurns: [],
|
|
140
|
+
summaries: [],
|
|
141
|
+
userProfile: {},
|
|
142
|
+
updatedAt: new Date(0).toISOString(),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function buildSystemPrompt(soul, schema, locale) {
|
|
146
|
+
if (!schema)
|
|
147
|
+
return soul.systemPrompt;
|
|
148
|
+
return [
|
|
149
|
+
soul.systemPrompt,
|
|
150
|
+
"",
|
|
151
|
+
`Antworte in ${locale || soul.locale || "de"}.`,
|
|
152
|
+
"Liefere eine natuerliche, hilfreiche Antwort.",
|
|
153
|
+
"Gib strikt JSON zurueck.",
|
|
154
|
+
`Pflichtfeld fuer die Hauptantwort: ${schema.replyKey}.`,
|
|
155
|
+
schema.followUpQuestionKey ? `Optionales naechstes Fragefeld: ${schema.followUpQuestionKey}.` : null,
|
|
156
|
+
schema.followUpQuestionsKey ? `Optionales Feld fuer weitere Fragen: ${schema.followUpQuestionsKey}.` : null,
|
|
157
|
+
schema.nextStepKey ? `Optionales Feld fuer den naechsten Schritt: ${schema.nextStepKey}.` : null,
|
|
158
|
+
schema.summaryKey ? `Optionales Feld fuer eine kurze Memory-Zusammenfassung: ${schema.summaryKey}.` : null,
|
|
159
|
+
schema.userProfileKey ? `Optionales Feld fuer strukturierte Nutzerhinweise: ${schema.userProfileKey}.` : null,
|
|
160
|
+
schema.rootPatternKey ? `Optionales Feld fuer ein erkanntes Grundmuster: ${schema.rootPatternKey}.` : null,
|
|
161
|
+
].filter(Boolean).join("\n");
|
|
162
|
+
}
|
|
163
|
+
function buildUserPrompt(message, memory, protocolSubjectHeader) {
|
|
164
|
+
const summary = memory.summaries.join("\n") || "(keine Zusammenfassung)";
|
|
165
|
+
const turns = memory.recentTurns.map((turn) => `${turn.role}: ${turn.content}`).join("\n") || "(kein Verlauf)";
|
|
166
|
+
return [
|
|
167
|
+
`Protocol subject: ${protocolSubjectHeader}`,
|
|
168
|
+
`Memory summary:\n${summary}`,
|
|
169
|
+
`Recent turns:\n${turns}`,
|
|
170
|
+
`Current message:\n${message}`,
|
|
171
|
+
].join("\n\n");
|
|
172
|
+
}
|
|
173
|
+
function normalizeCompletionResult(result, schema) {
|
|
174
|
+
if (typeof result === "string") {
|
|
175
|
+
if (!schema)
|
|
176
|
+
return { reply: result.trim() };
|
|
177
|
+
const parsed = tryParseJson(result);
|
|
178
|
+
if (parsed)
|
|
179
|
+
return composeStructuredReply(parsed, schema);
|
|
180
|
+
return { reply: result.trim() };
|
|
181
|
+
}
|
|
182
|
+
if (isSoulResponse(result)) {
|
|
183
|
+
return {
|
|
184
|
+
reply: String(result.reply || "").trim(),
|
|
185
|
+
payload: result.metadata && typeof result.metadata === "object"
|
|
186
|
+
? result.metadata
|
|
187
|
+
: undefined,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
if (result && typeof result === "object") {
|
|
191
|
+
return schema
|
|
192
|
+
? composeStructuredReply(result, schema)
|
|
193
|
+
: { reply: String(result.reply || "").trim(), payload: result };
|
|
194
|
+
}
|
|
195
|
+
return { reply: "" };
|
|
196
|
+
}
|
|
197
|
+
function composeStructuredReply(payload, schema) {
|
|
198
|
+
const parts = [];
|
|
199
|
+
const main = readString(payload[schema.replyKey]);
|
|
200
|
+
if (main)
|
|
201
|
+
parts.push(main);
|
|
202
|
+
const followUpQuestion = schema.followUpQuestionKey ? readString(payload[schema.followUpQuestionKey]) : undefined;
|
|
203
|
+
if (followUpQuestion)
|
|
204
|
+
parts.push(followUpQuestion);
|
|
205
|
+
const followUpQuestions = schema.followUpQuestionsKey ? readStringList(payload[schema.followUpQuestionsKey]) : [];
|
|
206
|
+
if (followUpQuestions.length)
|
|
207
|
+
parts.push(followUpQuestions.join("\n"));
|
|
208
|
+
const nextStep = schema.nextStepKey ? readString(payload[schema.nextStepKey]) : undefined;
|
|
209
|
+
if (nextStep)
|
|
210
|
+
parts.push(nextStep);
|
|
211
|
+
return {
|
|
212
|
+
reply: parts.filter(Boolean).join("\n\n").trim(),
|
|
213
|
+
payload,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function mergeMemory(args) {
|
|
217
|
+
const base = appendMemory(args.memory, args.userMessage, args.assistantReply);
|
|
218
|
+
const payload = args.payload;
|
|
219
|
+
const schema = args.schema;
|
|
220
|
+
if (!payload || !schema)
|
|
221
|
+
return base;
|
|
222
|
+
const summaries = [...base.summaries];
|
|
223
|
+
const summary = schema.summaryKey ? readString(payload[schema.summaryKey]) : undefined;
|
|
224
|
+
if (summary && !summaries.includes(summary))
|
|
225
|
+
summaries.push(summary);
|
|
226
|
+
const userProfile = {
|
|
227
|
+
...(base.userProfile || {}),
|
|
228
|
+
...(schema.userProfileKey && payload[schema.userProfileKey] && typeof payload[schema.userProfileKey] === "object"
|
|
229
|
+
? payload[schema.userProfileKey]
|
|
230
|
+
: {}),
|
|
231
|
+
};
|
|
232
|
+
const rootPattern = schema.rootPatternKey ? readString(payload[schema.rootPatternKey]) : undefined;
|
|
233
|
+
if (rootPattern) {
|
|
234
|
+
const existing = Array.isArray(userProfile.recurringPatterns)
|
|
235
|
+
? userProfile.recurringPatterns
|
|
236
|
+
: [];
|
|
237
|
+
if (!existing.includes(rootPattern)) {
|
|
238
|
+
userProfile.recurringPatterns = [...existing, rootPattern];
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return {
|
|
242
|
+
...base,
|
|
243
|
+
summaries: summaries.slice(-8),
|
|
244
|
+
userProfile,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function appendMemory(memory, userMessage, assistantReply) {
|
|
248
|
+
const nextTurns = [
|
|
249
|
+
...memory.recentTurns,
|
|
250
|
+
{ role: "user", content: userMessage, createdAt: new Date().toISOString() },
|
|
251
|
+
{ role: "assistant", content: assistantReply, createdAt: new Date().toISOString() },
|
|
252
|
+
].slice(-12);
|
|
253
|
+
return {
|
|
254
|
+
...memory,
|
|
255
|
+
recentTurns: nextTurns,
|
|
256
|
+
updatedAt: new Date().toISOString(),
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function isSoulResponse(value) {
|
|
260
|
+
return Boolean(value) && typeof value === "object" && typeof value.reply === "string";
|
|
261
|
+
}
|
|
262
|
+
function tryParseJson(value) {
|
|
263
|
+
try {
|
|
264
|
+
const parsed = JSON.parse(value);
|
|
265
|
+
return parsed && typeof parsed === "object" ? parsed : null;
|
|
266
|
+
}
|
|
267
|
+
catch {
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function readString(value) {
|
|
272
|
+
return typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
273
|
+
}
|
|
274
|
+
function readStringList(value) {
|
|
275
|
+
if (!Array.isArray(value))
|
|
276
|
+
return [];
|
|
277
|
+
return value.map((entry) => readString(entry)).filter((entry) => Boolean(entry));
|
|
278
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@valuya/bot-channel-core",
|
|
3
|
+
"version": "0.2.0-beta.1",
|
|
4
|
+
"description": "Shared soul, memory, and mentor helpers for gated bot-channel packages",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^25.0.10"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public",
|
|
23
|
+
"tag": "next"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "rm -rf dist && tsc -p tsconfig.json",
|
|
28
|
+
"test": "pnpm run build && node --test dist/*.test.js"
|
|
29
|
+
}
|
|
30
|
+
}
|