@hasna/todos 0.11.35 → 0.11.36
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/dist/cli/index.js +23 -1
- package/dist/db/agent-names.d.ts.map +1 -1
- package/dist/index.js +23 -1
- package/dist/mcp/index.js +23 -1
- package/dist/server/index.js +23 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -7556,9 +7556,31 @@ function isBlockedAgentName(name) {
|
|
|
7556
7556
|
const normalized = normalizeAgentNameInput(name);
|
|
7557
7557
|
return isGenericAgentName(normalized) || hasGeneratedNumericSuffix(normalized) || !ONE_WORD_NAME_RE.test(normalized);
|
|
7558
7558
|
}
|
|
7559
|
+
function alphabeticSuffix(index) {
|
|
7560
|
+
const letters = "abcdefghijklmnopqrstuvwxyz";
|
|
7561
|
+
let value = index;
|
|
7562
|
+
let suffix = "";
|
|
7563
|
+
do {
|
|
7564
|
+
suffix = letters[value % letters.length] + suffix;
|
|
7565
|
+
value = Math.floor(value / letters.length) - 1;
|
|
7566
|
+
} while (value >= 0);
|
|
7567
|
+
return suffix;
|
|
7568
|
+
}
|
|
7559
7569
|
function suggestAgentNames(existingNames = []) {
|
|
7560
7570
|
const existing = new Set([...existingNames].map(normalizeAgentNameInput));
|
|
7561
|
-
|
|
7571
|
+
const suggestions = PREFERRED_AGENT_NAMES.filter((name) => !existing.has(name));
|
|
7572
|
+
for (let suffixIndex = 0;suggestions.length < 20 && suffixIndex < 1000; suffixIndex++) {
|
|
7573
|
+
const suffix = alphabeticSuffix(suffixIndex);
|
|
7574
|
+
for (const base of PREFERRED_AGENT_NAMES) {
|
|
7575
|
+
const candidate = `${base}${suffix}`;
|
|
7576
|
+
if (existing.has(candidate) || suggestions.includes(candidate))
|
|
7577
|
+
continue;
|
|
7578
|
+
suggestions.push(candidate);
|
|
7579
|
+
if (suggestions.length >= 20)
|
|
7580
|
+
break;
|
|
7581
|
+
}
|
|
7582
|
+
}
|
|
7583
|
+
return suggestions;
|
|
7562
7584
|
}
|
|
7563
7585
|
function validateAgentName(name, existingNames = []) {
|
|
7564
7586
|
const normalized = normalizeAgentNameInput(name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-names.d.ts","sourceRoot":"","sources":["../../src/db/agent-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;gBAEnB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAE,MAAM,EAAO;CAKrE;AAED,eAAO,MAAM,iBAAiB,yRA0BpB,CAAC;AAEX,eAAO,MAAM,iBAAiB,8NAqBpB,CAAC;AAEX,eAAO,MAAM,gBAAgB,wGAWnB,CAAC;AAEX,eAAO,MAAM,qBAAqB,ykBAIxB,CAAC;AAoBX,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CASxD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGxD;
|
|
1
|
+
{"version":3,"file":"agent-names.d.ts","sourceRoot":"","sources":["../../src/db/agent-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;gBAEnB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAE,MAAM,EAAO;CAKrE;AAED,eAAO,MAAM,iBAAiB,yRA0BpB,CAAC;AAEX,eAAO,MAAM,iBAAiB,8NAqBpB,CAAC;AAEX,eAAO,MAAM,gBAAgB,wGAWnB,CAAC;AAEX,eAAO,MAAM,qBAAqB,ykBAIxB,CAAC;AAoBX,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CASxD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGxD;AAaD,wBAAgB,iBAAiB,CAAC,aAAa,GAAE,QAAQ,CAAC,MAAM,CAAM,GAAG,MAAM,EAAE,CAahF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,GAAE,QAAQ,CAAC,MAAM,CAAM,GAAG,MAAM,CAwB5F;AAyCD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,QAAQ,GAAG,sBAAsB,EAAE,CA6BnF"}
|
package/dist/index.js
CHANGED
|
@@ -5184,9 +5184,31 @@ function isBlockedAgentName(name) {
|
|
|
5184
5184
|
const normalized = normalizeAgentNameInput(name);
|
|
5185
5185
|
return isGenericAgentName(normalized) || hasGeneratedNumericSuffix(normalized) || !ONE_WORD_NAME_RE.test(normalized);
|
|
5186
5186
|
}
|
|
5187
|
+
function alphabeticSuffix(index) {
|
|
5188
|
+
const letters = "abcdefghijklmnopqrstuvwxyz";
|
|
5189
|
+
let value = index;
|
|
5190
|
+
let suffix = "";
|
|
5191
|
+
do {
|
|
5192
|
+
suffix = letters[value % letters.length] + suffix;
|
|
5193
|
+
value = Math.floor(value / letters.length) - 1;
|
|
5194
|
+
} while (value >= 0);
|
|
5195
|
+
return suffix;
|
|
5196
|
+
}
|
|
5187
5197
|
function suggestAgentNames(existingNames = []) {
|
|
5188
5198
|
const existing = new Set([...existingNames].map(normalizeAgentNameInput));
|
|
5189
|
-
|
|
5199
|
+
const suggestions = PREFERRED_AGENT_NAMES.filter((name) => !existing.has(name));
|
|
5200
|
+
for (let suffixIndex = 0;suggestions.length < 20 && suffixIndex < 1000; suffixIndex++) {
|
|
5201
|
+
const suffix = alphabeticSuffix(suffixIndex);
|
|
5202
|
+
for (const base of PREFERRED_AGENT_NAMES) {
|
|
5203
|
+
const candidate = `${base}${suffix}`;
|
|
5204
|
+
if (existing.has(candidate) || suggestions.includes(candidate))
|
|
5205
|
+
continue;
|
|
5206
|
+
suggestions.push(candidate);
|
|
5207
|
+
if (suggestions.length >= 20)
|
|
5208
|
+
break;
|
|
5209
|
+
}
|
|
5210
|
+
}
|
|
5211
|
+
return suggestions;
|
|
5190
5212
|
}
|
|
5191
5213
|
function validateAgentName(name, existingNames = []) {
|
|
5192
5214
|
const normalized = normalizeAgentNameInput(name);
|
package/dist/mcp/index.js
CHANGED
|
@@ -12710,9 +12710,31 @@ function isBlockedAgentName(name) {
|
|
|
12710
12710
|
const normalized = normalizeAgentNameInput(name);
|
|
12711
12711
|
return isGenericAgentName(normalized) || hasGeneratedNumericSuffix(normalized) || !ONE_WORD_NAME_RE.test(normalized);
|
|
12712
12712
|
}
|
|
12713
|
+
function alphabeticSuffix(index) {
|
|
12714
|
+
const letters = "abcdefghijklmnopqrstuvwxyz";
|
|
12715
|
+
let value = index;
|
|
12716
|
+
let suffix = "";
|
|
12717
|
+
do {
|
|
12718
|
+
suffix = letters[value % letters.length] + suffix;
|
|
12719
|
+
value = Math.floor(value / letters.length) - 1;
|
|
12720
|
+
} while (value >= 0);
|
|
12721
|
+
return suffix;
|
|
12722
|
+
}
|
|
12713
12723
|
function suggestAgentNames(existingNames = []) {
|
|
12714
12724
|
const existing = new Set([...existingNames].map(normalizeAgentNameInput));
|
|
12715
|
-
|
|
12725
|
+
const suggestions = PREFERRED_AGENT_NAMES.filter((name) => !existing.has(name));
|
|
12726
|
+
for (let suffixIndex = 0;suggestions.length < 20 && suffixIndex < 1000; suffixIndex++) {
|
|
12727
|
+
const suffix = alphabeticSuffix(suffixIndex);
|
|
12728
|
+
for (const base of PREFERRED_AGENT_NAMES) {
|
|
12729
|
+
const candidate = `${base}${suffix}`;
|
|
12730
|
+
if (existing.has(candidate) || suggestions.includes(candidate))
|
|
12731
|
+
continue;
|
|
12732
|
+
suggestions.push(candidate);
|
|
12733
|
+
if (suggestions.length >= 20)
|
|
12734
|
+
break;
|
|
12735
|
+
}
|
|
12736
|
+
}
|
|
12737
|
+
return suggestions;
|
|
12716
12738
|
}
|
|
12717
12739
|
function validateAgentName(name, existingNames = []) {
|
|
12718
12740
|
const normalized = normalizeAgentNameInput(name);
|
package/dist/server/index.js
CHANGED
|
@@ -3171,9 +3171,31 @@ function isGenericAgentName(name) {
|
|
|
3171
3171
|
}
|
|
3172
3172
|
return false;
|
|
3173
3173
|
}
|
|
3174
|
+
function alphabeticSuffix(index) {
|
|
3175
|
+
const letters = "abcdefghijklmnopqrstuvwxyz";
|
|
3176
|
+
let value = index;
|
|
3177
|
+
let suffix = "";
|
|
3178
|
+
do {
|
|
3179
|
+
suffix = letters[value % letters.length] + suffix;
|
|
3180
|
+
value = Math.floor(value / letters.length) - 1;
|
|
3181
|
+
} while (value >= 0);
|
|
3182
|
+
return suffix;
|
|
3183
|
+
}
|
|
3174
3184
|
function suggestAgentNames(existingNames = []) {
|
|
3175
3185
|
const existing = new Set([...existingNames].map(normalizeAgentNameInput));
|
|
3176
|
-
|
|
3186
|
+
const suggestions = PREFERRED_AGENT_NAMES.filter((name) => !existing.has(name));
|
|
3187
|
+
for (let suffixIndex = 0;suggestions.length < 20 && suffixIndex < 1000; suffixIndex++) {
|
|
3188
|
+
const suffix = alphabeticSuffix(suffixIndex);
|
|
3189
|
+
for (const base of PREFERRED_AGENT_NAMES) {
|
|
3190
|
+
const candidate = `${base}${suffix}`;
|
|
3191
|
+
if (existing.has(candidate) || suggestions.includes(candidate))
|
|
3192
|
+
continue;
|
|
3193
|
+
suggestions.push(candidate);
|
|
3194
|
+
if (suggestions.length >= 20)
|
|
3195
|
+
break;
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
return suggestions;
|
|
3177
3199
|
}
|
|
3178
3200
|
function validateAgentName(name, existingNames = []) {
|
|
3179
3201
|
const normalized = normalizeAgentNameInput(name);
|