@thesashadev/girl-agent 0.4.2 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.4
4
+
5
+ Дата: 2026-05-17
6
+
7
+ 📝 Документация
8
+
9
+ - Обновлена лицензионная политика: проект переведён на Community License (GSACL) версии 1.1, в лицензии явно уточнена позиция по дезинформации.
10
+
11
+
12
+ ## 0.4.3
13
+
14
+ Дата: 2026-05-17
15
+
16
+ 🐛 Исправления
17
+
18
+ - Устранено дублирование сообщений, возникавшее при перефразировании ответов моделью — одинаковые или близкие по содержанию «пузыри» больше не появляются дважды.
19
+
20
+
3
21
  ## 0.4.2
4
22
 
5
23
  Дата: 2026-05-17
package/LICENSE CHANGED
@@ -1,31 +1,216 @@
1
- girl-agent Source-Available Non-Commercial License
1
+ girl-agent Source-Available Community License (GSACL)
2
+ Version 1.1
2
3
 
3
- Copyright (c) 2026 girl-agent contributors.
4
- All rights reserved except as expressly stated below.
4
+ Copyright (c) 2026 girl-agent contributors
5
5
 
6
- Permission is granted to view, download, clone, and run this software
7
- for personal, educational, evaluation, and non-commercial testing purposes.
6
+ All rights reserved except as expressly permitted below.
8
7
 
9
- Permission is also granted to create forks and submit issues, pull requests,
10
- bug reports, patches, and improvement suggestions to the original repository.
8
+ -------------------------------------------------------------------------------
9
+ 1. DEFINITIONS
10
+ -------------------------------------------------------------------------------
11
11
 
12
- You may modify the software only for the purpose of personal testing,
13
- evaluation, or contributing improvements back to the original project.
12
+ "Software" means the girl-agent project, including source code, binaries,
13
+ scripts, prompts, models, datasets, APIs, configuration files, documentation,
14
+ examples, assets, and related materials.
14
15
 
15
- You may not, without prior written permission from the copyright holder:
16
+ "Project" means the original girl-agent repository and its maintainers.
16
17
 
17
- 1. use this software or substantial portions of it for commercial purposes;
18
- 2. sell, rent, sublicense, host, or provide this software as a paid service;
19
- 3. publish or distribute a competing product or public clone based on this software;
20
- 4. use this software in a commercial product, service, or company project;
21
- 5. remove or alter copyright notices, attribution, or license terms;
22
- 6. relicense this software under another license;
23
- 7. use the project name, branding, logo, documentation, or assets in a way that suggests endorsement or ownership.
18
+ "Non-Commercial Use" means personal, educational, academic, research,
19
+ security research, hobby, evaluation, open collaboration, and community use
20
+ that does not primarily generate revenue or provide a commercial business
21
+ service.
24
22
 
25
- Any contribution submitted to the original repository, including pull requests,
26
- patches, issues, ideas, documentation changes, or code suggestions, may be used,
27
- modified, and distributed by the project maintainers as part of this project.
23
+ "Commercial Use" includes selling, licensing, SaaS hosting, paid APIs,
24
+ enterprise/internal business usage, monetized services, or using the Software
25
+ as part of a commercial product or platform.
28
26
 
29
- This license does not grant any trademark rights.
27
+ "Community Contribution" means forks, pull requests, patches, plugins,
28
+ extensions, fixes, tools, integrations, documentation, translations,
29
+ benchmarks, tutorials, or derivative works created in good faith to improve,
30
+ support, expand, or help the Project ecosystem.
30
31
 
31
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
32
+ -------------------------------------------------------------------------------
33
+ 2. PERMITTED USES
34
+ -------------------------------------------------------------------------------
35
+
36
+ Subject to compliance with this license, you are granted a limited,
37
+ revocable, non-exclusive, non-transferable license to:
38
+
39
+ a) use, run, study, modify, and experiment with the Software
40
+ for Non-Commercial Use;
41
+
42
+ b) create public or private forks;
43
+
44
+ c) publish modified versions and derivative works;
45
+
46
+ d) create plugins, integrations, tooling, wrappers, extensions,
47
+ datasets, prompts, documentation, tutorials, and ecosystem projects;
48
+
49
+ e) contribute improvements back to the Project;
50
+
51
+ f) publicly discuss, benchmark, analyze, review, audit,
52
+ and research the Software;
53
+
54
+ g) create community editions, experimental branches,
55
+ compatibility layers, and interoperability projects,
56
+ provided they comply with this license.
57
+
58
+ Community activity intended to benefit, expand, support,
59
+ or improve the Project ecosystem is explicitly encouraged.
60
+
61
+ -------------------------------------------------------------------------------
62
+ 3. ATTRIBUTION
63
+ -------------------------------------------------------------------------------
64
+
65
+ Any public distribution of the Software or derivative works must:
66
+
67
+ a) preserve this license;
68
+
69
+ b) preserve copyright notices and attribution;
70
+
71
+ c) clearly acknowledge the original Project;
72
+
73
+ d) clearly indicate significant modifications;
74
+
75
+ e) avoid falsely presenting modified versions
76
+ as official releases of the Project.
77
+
78
+ -------------------------------------------------------------------------------
79
+ 4. COMMERCIAL RESTRICTIONS
80
+ -------------------------------------------------------------------------------
81
+
82
+ Without prior written permission from the copyright holder,
83
+ you may NOT:
84
+
85
+ a) sell the Software;
86
+
87
+ b) provide the Software as a paid hosted service or SaaS;
88
+
89
+ c) monetize API access based substantially on the Software;
90
+
91
+ d) use the Software inside a proprietary commercial product
92
+ or enterprise platform;
93
+
94
+ e) sublicense or relicense the Software under another license;
95
+
96
+ f) commercially exploit the branding, identity,
97
+ or reputation of the Project.
98
+
99
+ Commercial usage intended primarily to extract revenue
100
+ from the Software itself requires separate permission.
101
+
102
+ -------------------------------------------------------------------------------
103
+ 5. COMPETITION AND FAIR USE
104
+ -------------------------------------------------------------------------------
105
+
106
+ Competition, alternative implementations, forks,
107
+ and ecosystem diversity are allowed.
108
+
109
+ However, you may NOT:
110
+
111
+ a) attempt to monopolize the ecosystem surrounding the Software;
112
+
113
+ b) use dominant market power to suppress, absorb,
114
+ undermine, or eliminate the original Project;
115
+
116
+ c) falsely represent your version as the original Project;
117
+
118
+ d) engage in deceptive practices intended to confuse users,
119
+ contributors, or developers regarding ownership,
120
+ authorship, or official affiliation;
121
+
122
+ e) use the Software primarily to create a misleading clone
123
+ intended to exploit the reputation of the Project
124
+ without meaningful differentiation or contribution.
125
+
126
+ Nothing in this section restricts legitimate competition,
127
+ innovation, research, or independent development.
128
+
129
+ -------------------------------------------------------------------------------
130
+ 6. MISREPRESENTATION
131
+ -------------------------------------------------------------------------------
132
+
133
+ You may not knowingly publish false or misleading claims regarding:
134
+
135
+ - authorship;
136
+ - maintainers;
137
+ - licensing;
138
+ - telemetry;
139
+ - security;
140
+ - privacy;
141
+ - benchmarks;
142
+ - vulnerabilities;
143
+ - project history;
144
+ - repository ownership;
145
+ - contributor activity.
146
+
147
+ Truthful criticism, security research,
148
+ reverse engineering where legally permitted,
149
+ and public technical discussion are always allowed.
150
+
151
+ You may not knowingly publish or distribute false,
152
+ misleading, fabricated, or manipulated statements
153
+ regarding the identity, nationality, origin,
154
+ citizenship, location, background, affiliations,
155
+ or personal involvement of the Project maintainers
156
+ or contributors in connection with the Project.
157
+
158
+ This includes false claims intended to:
159
+ - misrepresent the origin of the Project;
160
+ - create political or reputational harm;
161
+ - falsely associate the Project with governments,
162
+ states, organizations, or political entities;
163
+ - impersonate or misidentify contributors;
164
+ - spread fabricated allegations regarding authorship
165
+ or control of the Project.
166
+
167
+ -------------------------------------------------------------------------------
168
+ 7. CONTRIBUTIONS
169
+ -------------------------------------------------------------------------------
170
+
171
+ By submitting Contributions to the Project,
172
+ you grant the Project maintainers a perpetual,
173
+ worldwide, royalty-free license to use, modify,
174
+ distribute, and incorporate those Contributions
175
+ into the Project.
176
+
177
+ You retain ownership of your Contributions.
178
+
179
+ -------------------------------------------------------------------------------
180
+ 8. TRADEMARKS
181
+ -------------------------------------------------------------------------------
182
+
183
+ This license does not grant rights to use
184
+ the Project's trademarks, branding, logos,
185
+ or visual identity in a misleading manner.
186
+
187
+ Reasonable nominative use for discussion,
188
+ comparison, tutorials, reviews, or compatibility
189
+ statements is permitted.
190
+
191
+ -------------------------------------------------------------------------------
192
+ 9. TERMINATION
193
+ -------------------------------------------------------------------------------
194
+
195
+ Any material violation of this license
196
+ automatically terminates the rights granted herein.
197
+
198
+ Rights may be reinstated if the violation
199
+ is corrected within a reasonable time
200
+ after notice from the copyright holder.
201
+
202
+ -------------------------------------------------------------------------------
203
+ 10. DISCLAIMER OF WARRANTY
204
+ -------------------------------------------------------------------------------
205
+
206
+ THE SOFTWARE IS PROVIDED "AS IS",
207
+ WITHOUT WARRANTY OF ANY KIND,
208
+ EXPRESS OR IMPLIED.
209
+
210
+ -------------------------------------------------------------------------------
211
+ 11. LIMITATION OF LIABILITY
212
+ -------------------------------------------------------------------------------
213
+
214
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
215
+ BE LIABLE FOR ANY CLAIM, DAMAGES, OR LIABILITY
216
+ ARISING FROM THE SOFTWARE OR ITS USE.
package/dist/cli.js CHANGED
@@ -5222,19 +5222,46 @@ import { EventEmitter } from "events";
5222
5222
  function normalizeForDuplicate(text) {
5223
5223
  return text.toLowerCase().replace(/\s+/g, " ").replace(/[.!?…)\]]+$/g, "").trim();
5224
5224
  }
5225
+ function bubbleTokens(text) {
5226
+ return normalizeForDuplicate(text).replace(/[^\p{L}\p{N}\s]/gu, " ").split(/\s+/).filter((t) => t.length > 1);
5227
+ }
5228
+ function bubbleIsContainedIn(shorter, longer) {
5229
+ const a = normalizeForDuplicate(shorter);
5230
+ const b = normalizeForDuplicate(longer);
5231
+ if (!a || !b || a === b) return false;
5232
+ if (a.length >= b.length) return false;
5233
+ if (b.includes(a)) return true;
5234
+ const shortTokens = bubbleTokens(shorter);
5235
+ if (shortTokens.length < 2) return false;
5236
+ const longSet = new Set(bubbleTokens(longer));
5237
+ const overlap = shortTokens.filter((t) => longSet.has(t)).length;
5238
+ return overlap / shortTokens.length >= 0.75;
5239
+ }
5225
5240
  function isDuplicateAssistantBubble(hist, text) {
5226
5241
  const normalized = normalizeForDuplicate(text);
5227
5242
  if (!normalized) return true;
5228
- return hist.slice(-8).filter((t) => t.role === "assistant").some((t) => normalizeForDuplicate(t.content) === normalized);
5243
+ const recent = hist.slice(-8).filter((t) => t.role === "assistant");
5244
+ return recent.some((t) => {
5245
+ const histNorm = normalizeForDuplicate(t.content);
5246
+ if (histNorm === normalized) return true;
5247
+ return bubbleIsContainedIn(text, t.content) || bubbleIsContainedIn(t.content, text);
5248
+ });
5229
5249
  }
5230
5250
  function dedupeBubbles(bubbles) {
5231
- const seen = /* @__PURE__ */ new Set();
5232
- return bubbles.filter((bubble) => {
5251
+ const kept = [];
5252
+ for (const bubble of bubbles) {
5233
5253
  const normalized = normalizeForDuplicate(bubble);
5234
- if (!normalized || seen.has(normalized)) return false;
5235
- seen.add(normalized);
5236
- return true;
5237
- });
5254
+ if (!normalized) continue;
5255
+ if (kept.some((k) => normalizeForDuplicate(k) === normalized)) continue;
5256
+ if (kept.some((k) => bubbleIsContainedIn(bubble, k))) continue;
5257
+ for (let i = kept.length - 1; i >= 0; i--) {
5258
+ if (bubbleIsContainedIn(kept[i], bubble)) {
5259
+ kept.splice(i, 1);
5260
+ }
5261
+ }
5262
+ kept.push(bubble);
5263
+ }
5264
+ return kept;
5238
5265
  }
5239
5266
  function smartSplitBubbles(reply, expectedBubbles) {
5240
5267
  const explicit = reply.split(/\n*---\n*/).map((s) => s.trim()).filter(Boolean);
@@ -6041,7 +6068,7 @@ ${m.text}` : media;
6041
6068
  intent=${tick.intent}
6042
6069
  \u043A\u043E\u043B-\u0432\u043E \u043F\u0443\u0437\u044B\u0440\u0435\u0439: ${tick.bubbles}${presenceHint ? `
6043
6070
  \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u044C: ${presenceHint}` : ""}
6044
- ${tick.intent === "short" ? "\u041E\u0442\u0432\u0435\u0447\u0430\u0439 \u043E\u0434\u043D\u043E\u0441\u043B\u043E\u0436\u043D\u043E: '\u043E\u043A', '\u044F\u0441\u043D\u043E', '\u0438?', '\u043D\u0443 \u043E\u043A'. \u0411\u0435\u0437 \u043E\u0431\u044A\u044F\u0441\u043D\u0435\u043D\u0438\u0439." : tick.bubbles > 1 ? "\u0420\u0430\u0437\u0431\u0435\u0439 \u043E\u0442\u0432\u0435\u0442 \u043D\u0430 \u043F\u0443\u0437\u044B\u0440\u0438 \u0421\u0422\u0420\u041E\u0413\u041E \u0441\u0442\u0440\u043E\u043A\u043E\u0439 '---' (\u0442\u0440\u0438 \u0434\u0435\u0444\u0438\u0441\u0430 \u043D\u0430 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0435) \u043C\u0435\u0436\u0434\u0443 \u043D\u0438\u043C\u0438. \u041A\u0410\u0416\u0414\u042B\u0419 \u043F\u0443\u0437\u044B\u0440\u044C \u2014 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0432 \u0442\u0433. \u0417\u0410\u041F\u0420\u0415\u0429\u0415\u041D\u041E \u0440\u0430\u0441\u043A\u0438\u0434\u044B\u0432\u0430\u0442\u044C \u043E\u0434\u043D\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0430 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0447\u0435\u0440\u0435\u0437 \u043F\u0435\u0440\u0435\u043D\u043E\u0441 \u0441\u0442\u0440\u043E\u043A\u0438 \u0431\u0435\u0437 '---' \u2014 \u0432 \u0442\u0433 \u044D\u0442\u043E \u0432\u044B\u0433\u043B\u044F\u0434\u0438\u0442 \u043A\u0430\u043A \u043E\u0434\u043D\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0432 \u0441\u0442\u043E\u043B\u0431\u0438\u043A, \u0447\u0442\u043E \u043F\u0430\u043B\u0438\u0442 \u0418\u0418. \u041F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E:\\n\\n\u043F\u0440\u0438\u0432\u0435\u0442\\n---\\n\u043A\u0430\u043A \u0441\u0430\u043C\\n\\n\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E:\\n\\n\u043F\u0440\u0438\u0432\u0435\u0442\\n\u043A\u0430\u043A \u0441\u0430\u043C" : "\u041E\u0434\u0438\u043D \u043A\u043E\u0440\u043E\u0442\u043A\u0438\u0439 \u043E\u0442\u0432\u0435\u0442, \u0431\u0435\u0437 '---'."}${scopeHint}` },
6071
+ ${tick.intent === "short" ? "\u041E\u0442\u0432\u0435\u0447\u0430\u0439 \u043E\u0434\u043D\u043E\u0441\u043B\u043E\u0436\u043D\u043E: '\u043E\u043A', '\u044F\u0441\u043D\u043E', '\u0438?', '\u043D\u0443 \u043E\u043A'. \u0411\u0435\u0437 \u043E\u0431\u044A\u044F\u0441\u043D\u0435\u043D\u0438\u0439." : tick.bubbles > 1 ? "\u0420\u0430\u0437\u0431\u0435\u0439 \u043E\u0442\u0432\u0435\u0442 \u043D\u0430 \u043F\u0443\u0437\u044B\u0440\u0438 \u0421\u0422\u0420\u041E\u0413\u041E \u0441\u0442\u0440\u043E\u043A\u043E\u0439 '---' (\u0442\u0440\u0438 \u0434\u0435\u0444\u0438\u0441\u0430 \u043D\u0430 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0435) \u043C\u0435\u0436\u0434\u0443 \u043D\u0438\u043C\u0438. \u041A\u0410\u0416\u0414\u042B\u0419 \u043F\u0443\u0437\u044B\u0440\u044C \u2014 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0432 \u0442\u0433. \u0417\u0410\u041F\u0420\u0415\u0429\u0415\u041D\u041E \u0440\u0430\u0441\u043A\u0438\u0434\u044B\u0432\u0430\u0442\u044C \u043E\u0434\u043D\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0430 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0447\u0435\u0440\u0435\u0437 \u043F\u0435\u0440\u0435\u043D\u043E\u0441 \u0441\u0442\u0440\u043E\u043A\u0438 \u0431\u0435\u0437 '---' \u2014 \u0432 \u0442\u0433 \u044D\u0442\u043E \u0432\u044B\u0433\u043B\u044F\u0434\u0438\u0442 \u043A\u0430\u043A \u043E\u0434\u043D\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0432 \u0441\u0442\u043E\u043B\u0431\u0438\u043A, \u0447\u0442\u043E \u043F\u0430\u043B\u0438\u0442 \u0418\u0418. \u041F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E:\\n\\n\u043F\u0440\u0438\u0432\u0435\u0442\\n---\\n\u043A\u0430\u043A \u0441\u0430\u043C\\n\\n\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E:\\n\\n\u043F\u0440\u0438\u0432\u0435\u0442\\n\u043A\u0430\u043A \u0441\u0430\u043C\n\n\u041A\u0420\u0418\u0422\u0418\u0427\u041D\u041E: \u043A\u0430\u0436\u0434\u044B\u0439 \u043F\u0443\u0437\u044B\u0440\u044C \u2014 \u041D\u041E\u0412\u0410\u042F \u043C\u044B\u0441\u043B\u044C. \u0417\u0410\u041F\u0420\u0415\u0429\u0415\u041D\u041E \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u0442\u044C \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0444\u0440\u0430\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C \u043F\u0443\u0437\u044B\u0440\u0435 \u0442\u043E \u0436\u0435, \u0447\u0442\u043E \u0441\u043A\u0430\u0437\u0430\u043B\u0430 \u0432 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C. \u0415\u0441\u043B\u0438 \u0443\u0436\u0435 \u0441\u043A\u0430\u0437\u0430\u043B\u0430 '\u043F\u043E \u043F\u043E\u0432\u043E\u0434\u0443 \u0437\u0430\u0432\u0442\u0440\u0430' \u2014 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u043F\u0443\u0437\u044B\u0440\u044C \u041D\u0415 \u0434\u043E\u043B\u0436\u0435\u043D \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 '\u043F\u043E \u043F\u043E\u0432\u043E\u0434\u0443 \u0437\u0430\u0432\u0442\u0440\u0430 \u0435\u0449\u0451...'. \u041D\u0435 \u0446\u0438\u0442\u0438\u0440\u0443\u0439 \u0438 \u043D\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044F\u0439 \u0441\u0432\u043E\u0438 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 \u043F\u0443\u0437\u044B\u0440\u0438. \u0424\u0438\u043D\u0430\u043B\u044C\u043D\u044B\u0439 \u043E\u0442\u0432\u0435\u0442 \u0432\u044B\u0434\u0430\u0439 \u041E\u0414\u0418\u041D \u0440\u0430\u0437, \u043D\u0435 \u043F\u0435\u0440\u0435\u043F\u0438\u0441\u044B\u0432\u0430\u0439 \u0435\u0433\u043E \u0434\u0440\u0443\u0433\u0438\u043C\u0438 \u0441\u043B\u043E\u0432\u0430\u043C\u0438." : "\u041E\u0434\u0438\u043D \u043A\u043E\u0440\u043E\u0442\u043A\u0438\u0439 \u043E\u0442\u0432\u0435\u0442, \u0431\u0435\u0437 '---'."}${scopeHint}` },
6045
6072
  ...hist.slice(-60).map((t) => ({ role: t.role, content: t.content }))
6046
6073
  ];
6047
6074
  const image = imagePartFromMedia(incoming?.media);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thesashadev/girl-agent",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Telegram AI persona engine with memory, schedule, relationship state and MTProto userbot mode.",
5
5
  "type": "module",
6
6
  "bin": {