@hasna/todos 0.11.34 → 0.11.35
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 +12 -0
- package/dist/cli/commands/agent-commands.d.ts.map +1 -1
- package/dist/cli/commands/api-key-commands.d.ts +3 -0
- package/dist/cli/commands/api-key-commands.d.ts.map +1 -0
- package/dist/cli/commands/config-serve-commands.d.ts.map +1 -1
- package/dist/cli/index.js +521 -41
- package/dist/db/agent-names.d.ts +23 -0
- package/dist/db/agent-names.d.ts.map +1 -0
- package/dist/db/agents.d.ts +2 -0
- package/dist/db/agents.d.ts.map +1 -1
- package/dist/db/api-keys.d.ts +28 -0
- package/dist/db/api-keys.d.ts.map +1 -0
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +333 -5
- package/dist/mcp/index.js +274 -8
- package/dist/mcp/tools/agents.d.ts.map +1 -1
- package/dist/server/index.js +284 -33
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/serve.d.ts.map +1 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/mcp/index.js
CHANGED
|
@@ -830,6 +830,22 @@ var init_migrations = __esm(() => {
|
|
|
830
830
|
ALTER TABLE tasks ADD COLUMN cycle_id TEXT REFERENCES cycles(id) ON DELETE SET NULL;
|
|
831
831
|
CREATE INDEX IF NOT EXISTS idx_tasks_cycle ON tasks(cycle_id) WHERE cycle_id IS NOT NULL;
|
|
832
832
|
INSERT OR IGNORE INTO _migrations (id) VALUES (49);
|
|
833
|
+
`,
|
|
834
|
+
`
|
|
835
|
+
CREATE TABLE IF NOT EXISTS api_keys (
|
|
836
|
+
id TEXT PRIMARY KEY,
|
|
837
|
+
name TEXT NOT NULL,
|
|
838
|
+
key_hash TEXT NOT NULL UNIQUE,
|
|
839
|
+
prefix TEXT NOT NULL UNIQUE,
|
|
840
|
+
permissions TEXT NOT NULL DEFAULT '["*"]',
|
|
841
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
842
|
+
last_used_at TEXT,
|
|
843
|
+
expires_at TEXT,
|
|
844
|
+
revoked_at TEXT
|
|
845
|
+
);
|
|
846
|
+
CREATE INDEX IF NOT EXISTS idx_api_keys_prefix ON api_keys(prefix);
|
|
847
|
+
CREATE INDEX IF NOT EXISTS idx_api_keys_active ON api_keys(revoked_at, expires_at);
|
|
848
|
+
INSERT OR IGNORE INTO _migrations (id) VALUES (50);
|
|
833
849
|
`
|
|
834
850
|
];
|
|
835
851
|
});
|
|
@@ -1228,6 +1244,20 @@ function ensureSchema(db) {
|
|
|
1228
1244
|
ensureIndex("CREATE INDEX IF NOT EXISTS idx_cycles_dates ON cycles(start_date, end_date)");
|
|
1229
1245
|
ensureColumn("tasks", "cycle_id", "TEXT REFERENCES cycles(id) ON DELETE SET NULL");
|
|
1230
1246
|
ensureIndex("CREATE INDEX IF NOT EXISTS idx_tasks_cycle ON tasks(cycle_id) WHERE cycle_id IS NOT NULL");
|
|
1247
|
+
ensureTable("api_keys", `
|
|
1248
|
+
CREATE TABLE api_keys (
|
|
1249
|
+
id TEXT PRIMARY KEY,
|
|
1250
|
+
name TEXT NOT NULL,
|
|
1251
|
+
key_hash TEXT NOT NULL UNIQUE,
|
|
1252
|
+
prefix TEXT NOT NULL UNIQUE,
|
|
1253
|
+
permissions TEXT NOT NULL DEFAULT '["*"]',
|
|
1254
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
1255
|
+
last_used_at TEXT,
|
|
1256
|
+
expires_at TEXT,
|
|
1257
|
+
revoked_at TEXT
|
|
1258
|
+
)`);
|
|
1259
|
+
ensureIndex("CREATE INDEX IF NOT EXISTS idx_api_keys_prefix ON api_keys(prefix)");
|
|
1260
|
+
ensureIndex("CREATE INDEX IF NOT EXISTS idx_api_keys_active ON api_keys(revoked_at, expires_at)");
|
|
1231
1261
|
}
|
|
1232
1262
|
function backfillTaskTags(db) {
|
|
1233
1263
|
try {
|
|
@@ -12655,14 +12685,224 @@ See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode de
|
|
|
12655
12685
|
init_adapter();
|
|
12656
12686
|
});
|
|
12657
12687
|
|
|
12688
|
+
// src/db/agent-names.ts
|
|
12689
|
+
function normalizeAgentNameInput(name) {
|
|
12690
|
+
return name.trim().toLowerCase();
|
|
12691
|
+
}
|
|
12692
|
+
function hasGeneratedNumericSuffix(name) {
|
|
12693
|
+
return NUMERIC_SUFFIX_RE.test(normalizeAgentNameInput(name));
|
|
12694
|
+
}
|
|
12695
|
+
function isGenericAgentName(name) {
|
|
12696
|
+
const normalized = normalizeAgentNameInput(name);
|
|
12697
|
+
if (RESERVED_GENERIC_NAMES.has(normalized))
|
|
12698
|
+
return true;
|
|
12699
|
+
for (const generic of RESERVED_GENERIC_NAMES) {
|
|
12700
|
+
if (normalized === `${generic}s`)
|
|
12701
|
+
return true;
|
|
12702
|
+
if (normalized.match(new RegExp(`^${generic}\\d+$`)))
|
|
12703
|
+
return true;
|
|
12704
|
+
if (normalized.match(new RegExp(`^${generic}[-_]\\d+$`)))
|
|
12705
|
+
return true;
|
|
12706
|
+
}
|
|
12707
|
+
return false;
|
|
12708
|
+
}
|
|
12709
|
+
function isBlockedAgentName(name) {
|
|
12710
|
+
const normalized = normalizeAgentNameInput(name);
|
|
12711
|
+
return isGenericAgentName(normalized) || hasGeneratedNumericSuffix(normalized) || !ONE_WORD_NAME_RE.test(normalized);
|
|
12712
|
+
}
|
|
12713
|
+
function suggestAgentNames(existingNames = []) {
|
|
12714
|
+
const existing = new Set([...existingNames].map(normalizeAgentNameInput));
|
|
12715
|
+
return PREFERRED_AGENT_NAMES.filter((name) => !existing.has(name));
|
|
12716
|
+
}
|
|
12717
|
+
function validateAgentName(name, existingNames = []) {
|
|
12718
|
+
const normalized = normalizeAgentNameInput(name);
|
|
12719
|
+
const suggestions = suggestAgentNames(existingNames).slice(0, 5);
|
|
12720
|
+
if (!normalized) {
|
|
12721
|
+
throw new InvalidAgentNameError(name, "choose a real one-word name instead of an empty value", suggestions);
|
|
12722
|
+
}
|
|
12723
|
+
if (/\s/.test(normalized)) {
|
|
12724
|
+
throw new InvalidAgentNameError(name, "use a single word, preferably a Roman or Greek name", suggestions);
|
|
12725
|
+
}
|
|
12726
|
+
if (normalized.length < 3) {
|
|
12727
|
+
throw new InvalidAgentNameError(name, "use a more distinctive name with at least three characters", suggestions);
|
|
12728
|
+
}
|
|
12729
|
+
if (isGenericAgentName(normalized)) {
|
|
12730
|
+
throw new InvalidAgentNameError(name, "generic names like agent, agent-1, assistant, or worker-2 are reserved", suggestions);
|
|
12731
|
+
}
|
|
12732
|
+
if (hasGeneratedNumericSuffix(normalized)) {
|
|
12733
|
+
throw new InvalidAgentNameError(name, "numbered suffix names are not allowed; pick a distinct human-readable name", suggestions);
|
|
12734
|
+
}
|
|
12735
|
+
if (!ONE_WORD_NAME_RE.test(normalized)) {
|
|
12736
|
+
throw new InvalidAgentNameError(name, "use one word made of letters only, preferably a Roman or Greek name", suggestions);
|
|
12737
|
+
}
|
|
12738
|
+
return normalized;
|
|
12739
|
+
}
|
|
12740
|
+
function tableHasColumn(db, table, column) {
|
|
12741
|
+
try {
|
|
12742
|
+
return db.query(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
12743
|
+
} catch {
|
|
12744
|
+
return false;
|
|
12745
|
+
}
|
|
12746
|
+
}
|
|
12747
|
+
function updateReferences(db, oldName, newName) {
|
|
12748
|
+
const refs = [
|
|
12749
|
+
["tasks", "assigned_to"],
|
|
12750
|
+
["tasks", "agent_id"],
|
|
12751
|
+
["tasks", "locked_by"],
|
|
12752
|
+
["tasks", "assigned_by"],
|
|
12753
|
+
["plans", "agent_id"],
|
|
12754
|
+
["sessions", "agent_id"],
|
|
12755
|
+
["task_comments", "agent_id"],
|
|
12756
|
+
["task_history", "agent_id"],
|
|
12757
|
+
["webhooks", "agent_id"],
|
|
12758
|
+
["task_files", "agent_id"],
|
|
12759
|
+
["task_time_logs", "agent_id"],
|
|
12760
|
+
["task_watchers", "agent_id"],
|
|
12761
|
+
["task_checkpoints", "agent_id"],
|
|
12762
|
+
["task_heartbeats", "agent_id"],
|
|
12763
|
+
["project_agent_roles", "agent_id"]
|
|
12764
|
+
];
|
|
12765
|
+
let changed = 0;
|
|
12766
|
+
for (const [table, column] of refs) {
|
|
12767
|
+
if (!tableHasColumn(db, table, column))
|
|
12768
|
+
continue;
|
|
12769
|
+
try {
|
|
12770
|
+
changed += db.run(`UPDATE ${table} SET ${column} = ? WHERE LOWER(${column}) = ?`, [newName, oldName]).changes;
|
|
12771
|
+
} catch {}
|
|
12772
|
+
}
|
|
12773
|
+
return changed;
|
|
12774
|
+
}
|
|
12775
|
+
function normalizeGeneratedAgentNames(db) {
|
|
12776
|
+
const rows = db.query("SELECT * FROM agents ORDER BY created_at, id").all();
|
|
12777
|
+
const existing = new Set(rows.map((agent) => normalizeAgentNameInput(agent.name)));
|
|
12778
|
+
const renamed = [];
|
|
12779
|
+
for (const agent of rows) {
|
|
12780
|
+
const oldName = normalizeAgentNameInput(agent.name);
|
|
12781
|
+
if (!isBlockedAgentName(oldName))
|
|
12782
|
+
continue;
|
|
12783
|
+
const candidates = suggestAgentNames(existing);
|
|
12784
|
+
const replacement = candidates[0];
|
|
12785
|
+
if (!replacement) {
|
|
12786
|
+
throw new Error("No safe agent names are available for normalization");
|
|
12787
|
+
}
|
|
12788
|
+
existing.delete(oldName);
|
|
12789
|
+
existing.add(replacement);
|
|
12790
|
+
db.run("UPDATE agents SET name = ?, last_seen_at = ? WHERE id = ?", [replacement, now(), agent.id]);
|
|
12791
|
+
const referenceUpdates = updateReferences(db, oldName, replacement);
|
|
12792
|
+
renamed.push({
|
|
12793
|
+
id: agent.id,
|
|
12794
|
+
old_name: oldName,
|
|
12795
|
+
new_name: replacement,
|
|
12796
|
+
reference_updates: referenceUpdates
|
|
12797
|
+
});
|
|
12798
|
+
}
|
|
12799
|
+
return renamed;
|
|
12800
|
+
}
|
|
12801
|
+
var InvalidAgentNameError, ROMAN_AGENT_NAMES, GREEK_AGENT_NAMES, NICE_AGENT_NAMES, PREFERRED_AGENT_NAMES, RESERVED_GENERIC_NAMES, NUMERIC_SUFFIX_RE, ONE_WORD_NAME_RE;
|
|
12802
|
+
var init_agent_names = __esm(() => {
|
|
12803
|
+
init_database();
|
|
12804
|
+
InvalidAgentNameError = class InvalidAgentNameError extends Error {
|
|
12805
|
+
suggestions;
|
|
12806
|
+
constructor(name, reason, suggestions = []) {
|
|
12807
|
+
super(`Invalid agent name "${name}": ${reason}${suggestions.length > 0 ? `. Try: ${suggestions.join(", ")}` : ""}`);
|
|
12808
|
+
this.name = "InvalidAgentNameError";
|
|
12809
|
+
this.suggestions = suggestions;
|
|
12810
|
+
}
|
|
12811
|
+
};
|
|
12812
|
+
ROMAN_AGENT_NAMES = [
|
|
12813
|
+
"caesar",
|
|
12814
|
+
"augustus",
|
|
12815
|
+
"marcus",
|
|
12816
|
+
"brutus",
|
|
12817
|
+
"cicero",
|
|
12818
|
+
"cato",
|
|
12819
|
+
"nero",
|
|
12820
|
+
"claudius",
|
|
12821
|
+
"tiberius",
|
|
12822
|
+
"hadrian",
|
|
12823
|
+
"trajan",
|
|
12824
|
+
"vespasian",
|
|
12825
|
+
"domitian",
|
|
12826
|
+
"caligula",
|
|
12827
|
+
"commodus",
|
|
12828
|
+
"livia",
|
|
12829
|
+
"julia",
|
|
12830
|
+
"octavia",
|
|
12831
|
+
"claudia",
|
|
12832
|
+
"agrippina",
|
|
12833
|
+
"cornelia",
|
|
12834
|
+
"valeria",
|
|
12835
|
+
"fulvia",
|
|
12836
|
+
"hortensia",
|
|
12837
|
+
"fabia"
|
|
12838
|
+
];
|
|
12839
|
+
GREEK_AGENT_NAMES = [
|
|
12840
|
+
"athena",
|
|
12841
|
+
"apollo",
|
|
12842
|
+
"artemis",
|
|
12843
|
+
"hera",
|
|
12844
|
+
"iris",
|
|
12845
|
+
"hector",
|
|
12846
|
+
"achilles",
|
|
12847
|
+
"odysseus",
|
|
12848
|
+
"theseus",
|
|
12849
|
+
"pericles",
|
|
12850
|
+
"solon",
|
|
12851
|
+
"sophia",
|
|
12852
|
+
"thalia",
|
|
12853
|
+
"calliope",
|
|
12854
|
+
"clio",
|
|
12855
|
+
"phoebe",
|
|
12856
|
+
"daphne",
|
|
12857
|
+
"leonidas",
|
|
12858
|
+
"andromeda",
|
|
12859
|
+
"cassander"
|
|
12860
|
+
];
|
|
12861
|
+
NICE_AGENT_NAMES = [
|
|
12862
|
+
"atlas",
|
|
12863
|
+
"aurora",
|
|
12864
|
+
"ember",
|
|
12865
|
+
"nova",
|
|
12866
|
+
"orion",
|
|
12867
|
+
"rhea",
|
|
12868
|
+
"selene",
|
|
12869
|
+
"sirius",
|
|
12870
|
+
"vesper",
|
|
12871
|
+
"zephyr"
|
|
12872
|
+
];
|
|
12873
|
+
PREFERRED_AGENT_NAMES = [
|
|
12874
|
+
...ROMAN_AGENT_NAMES,
|
|
12875
|
+
...GREEK_AGENT_NAMES,
|
|
12876
|
+
...NICE_AGENT_NAMES
|
|
12877
|
+
];
|
|
12878
|
+
RESERVED_GENERIC_NAMES = new Set([
|
|
12879
|
+
"agent",
|
|
12880
|
+
"agents",
|
|
12881
|
+
"ai",
|
|
12882
|
+
"assistant",
|
|
12883
|
+
"bot",
|
|
12884
|
+
"coder",
|
|
12885
|
+
"default",
|
|
12886
|
+
"helper",
|
|
12887
|
+
"model",
|
|
12888
|
+
"system",
|
|
12889
|
+
"user",
|
|
12890
|
+
"worker"
|
|
12891
|
+
]);
|
|
12892
|
+
NUMERIC_SUFFIX_RE = /[-_]\d+$/;
|
|
12893
|
+
ONE_WORD_NAME_RE = /^[a-z]+$/;
|
|
12894
|
+
});
|
|
12895
|
+
|
|
12658
12896
|
// src/db/agents.ts
|
|
12659
12897
|
var exports_agents = {};
|
|
12660
12898
|
__export(exports_agents, {
|
|
12661
12899
|
updateAgentActivity: () => updateAgentActivity,
|
|
12662
12900
|
updateAgent: () => updateAgent,
|
|
12663
12901
|
unarchiveAgent: () => unarchiveAgent,
|
|
12902
|
+
suggestAgentNames: () => suggestAgentNames,
|
|
12664
12903
|
releaseAgent: () => releaseAgent,
|
|
12665
12904
|
registerAgent: () => registerAgent,
|
|
12905
|
+
normalizeGeneratedAgentNames: () => normalizeGeneratedAgentNames,
|
|
12666
12906
|
matchCapabilities: () => matchCapabilities,
|
|
12667
12907
|
listAgents: () => listAgents,
|
|
12668
12908
|
isAgentConflict: () => isAgentConflict,
|
|
@@ -12674,7 +12914,8 @@ __export(exports_agents, {
|
|
|
12674
12914
|
getAgent: () => getAgent,
|
|
12675
12915
|
deleteAgent: () => deleteAgent,
|
|
12676
12916
|
autoReleaseStaleAgents: () => autoReleaseStaleAgents,
|
|
12677
|
-
archiveAgent: () => archiveAgent
|
|
12917
|
+
archiveAgent: () => archiveAgent,
|
|
12918
|
+
InvalidAgentNameError: () => InvalidAgentNameError
|
|
12678
12919
|
});
|
|
12679
12920
|
function getActiveWindowMs() {
|
|
12680
12921
|
const env = process.env["TODOS_AGENT_TIMEOUT_MS"];
|
|
@@ -12697,7 +12938,7 @@ function getAvailableNamesFromPool(pool, db) {
|
|
|
12697
12938
|
autoReleaseStaleAgents(db);
|
|
12698
12939
|
const cutoff = new Date(Date.now() - getActiveWindowMs()).toISOString();
|
|
12699
12940
|
const activeNames = new Set(db.query("SELECT name FROM agents WHERE status = 'active' AND last_seen_at > ?").all(cutoff).map((r) => r.name.toLowerCase()));
|
|
12700
|
-
return pool.filter((name) => !activeNames.has(name
|
|
12941
|
+
return pool.map(normalizeAgentNameInput).filter((name) => !activeNames.has(name));
|
|
12701
12942
|
}
|
|
12702
12943
|
function shortUuid() {
|
|
12703
12944
|
return crypto.randomUUID().slice(0, 8);
|
|
@@ -12713,7 +12954,8 @@ function rowToAgent(row) {
|
|
|
12713
12954
|
}
|
|
12714
12955
|
function registerAgent(input, db) {
|
|
12715
12956
|
const d = db || getDatabase();
|
|
12716
|
-
const
|
|
12957
|
+
const existingNames = d.query("SELECT name FROM agents").all().map((row) => row.name);
|
|
12958
|
+
const normalizedName = validateAgentName(input.name, existingNames);
|
|
12717
12959
|
const existing = getAgentByName(normalizedName, d);
|
|
12718
12960
|
if (existing) {
|
|
12719
12961
|
const lastSeenMs = new Date(existing.last_seen_at).getTime();
|
|
@@ -12846,7 +13088,8 @@ function updateAgent(id, input, db) {
|
|
|
12846
13088
|
const sets = ["last_seen_at = ?"];
|
|
12847
13089
|
const params = [now()];
|
|
12848
13090
|
if (input.name !== undefined) {
|
|
12849
|
-
const
|
|
13091
|
+
const existingNames = d.query("SELECT name FROM agents WHERE id != ?").all(id).map((row) => row.name);
|
|
13092
|
+
const newName = validateAgentName(input.name, existingNames);
|
|
12850
13093
|
const holder = getAgentByName(newName, d);
|
|
12851
13094
|
if (holder && holder.id !== id) {
|
|
12852
13095
|
const lastSeenMs = new Date(holder.last_seen_at).getTime();
|
|
@@ -12957,6 +13200,7 @@ function getCapableAgents(capabilities, opts, db) {
|
|
|
12957
13200
|
}
|
|
12958
13201
|
var init_agents = __esm(() => {
|
|
12959
13202
|
init_database();
|
|
13203
|
+
init_agent_names();
|
|
12960
13204
|
});
|
|
12961
13205
|
|
|
12962
13206
|
// src/types/index.ts
|
|
@@ -25474,8 +25718,8 @@ function registerAgentTools(server, { shouldRegisterTool, resolveId, formatError
|
|
|
25474
25718
|
});
|
|
25475
25719
|
}
|
|
25476
25720
|
if (shouldRegisterTool("register_agent")) {
|
|
25477
|
-
server.tool("register_agent", "Register an agent
|
|
25478
|
-
name: exports_external.string().describe("
|
|
25721
|
+
server.tool("register_agent", "Register an agent with a distinctive one-word name. Generic/generated names like agent, agent-1, assistant, or worker-2 are rejected. Prefer Roman or Greek names from suggest_agent_name.", {
|
|
25722
|
+
name: exports_external.string().describe("Distinctive one-word agent name. Use suggest_agent_name first; avoid agent, agent-1, and other numbered generated names."),
|
|
25479
25723
|
description: exports_external.string().optional(),
|
|
25480
25724
|
role: exports_external.string().optional(),
|
|
25481
25725
|
title: exports_external.string().optional(),
|
|
@@ -25519,7 +25763,7 @@ Last seen: ${agent.last_seen_at}`
|
|
|
25519
25763
|
});
|
|
25520
25764
|
}
|
|
25521
25765
|
if (shouldRegisterTool("suggest_agent_name")) {
|
|
25522
|
-
server.tool("suggest_agent_name", "Get available agent names for a project.
|
|
25766
|
+
server.tool("suggest_agent_name", "Get available Roman/Greek-style agent names for a project. Use these instead of generic generated names.", {
|
|
25523
25767
|
working_dir: exports_external.string().optional().describe("Your working directory \u2014 used to look up the project's allowed name pool from config")
|
|
25524
25768
|
}, async ({ working_dir }) => {
|
|
25525
25769
|
try {
|
|
@@ -25527,8 +25771,30 @@ Last seen: ${agent.last_seen_at}`
|
|
|
25527
25771
|
const cutoff = new Date(Date.now() - 30 * 60 * 1000).toISOString();
|
|
25528
25772
|
const allActive = listAgents().filter((a) => a.last_seen_at > cutoff);
|
|
25529
25773
|
if (!pool) {
|
|
25774
|
+
const suggestions = getAvailableNamesFromPool([
|
|
25775
|
+
"caesar",
|
|
25776
|
+
"augustus",
|
|
25777
|
+
"marcus",
|
|
25778
|
+
"brutus",
|
|
25779
|
+
"cicero",
|
|
25780
|
+
"cato",
|
|
25781
|
+
"nero",
|
|
25782
|
+
"claudius",
|
|
25783
|
+
"tiberius",
|
|
25784
|
+
"hadrian",
|
|
25785
|
+
"athena",
|
|
25786
|
+
"apollo",
|
|
25787
|
+
"artemis",
|
|
25788
|
+
"iris",
|
|
25789
|
+
"hector",
|
|
25790
|
+
"sophia",
|
|
25791
|
+
"thalia",
|
|
25792
|
+
"phoebe",
|
|
25793
|
+
"daphne"
|
|
25794
|
+
], getDatabase());
|
|
25530
25795
|
const lines2 = [
|
|
25531
|
-
"No
|
|
25796
|
+
"No project pool configured. Use a distinctive one-word name; generic generated names are blocked.",
|
|
25797
|
+
`Suggested names: ${suggestions.slice(0, 8).join(", ")}`,
|
|
25532
25798
|
allActive.length > 0 ? `Active agents (avoid these names): ${allActive.map((a) => `${a.name} (seen ${Math.round((Date.now() - new Date(a.last_seen_at).getTime()) / 60000)}m ago)`).join(", ")}` : "No active agents.",
|
|
25533
25799
|
`
|
|
25534
25800
|
To restrict names, configure agent_pool or project_pools in ~/.hasna/todos/config.json`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,KAAK,OAAO,GAAG;IACb,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;IACpC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;CAC5D,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,UAAU,UAAU;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,KAAK,OAAO,GAAG;IACb,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9C,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;IACpC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;CAC5D,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE,OAAO,GAAG,IAAI,CAwbjJ"}
|