Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
fix(post_to_thread): activity label and review fixes
AdityaUmalef5d450d89f8e
diff --git a/server/activity.ts b/server/activity.tsindex 61c49d8c7a..2211d3eda8 100644--- a/server/activity.ts+++ b/server/activity.ts@@ -111,6 +111,7 @@ const TEAM_ACTION_KEYS: Record<string, string> = {memory_update: "activity.tool.team.memoryUpdate",message_person: "activity.tool.team.messagePerson",post_to_room: "activity.tool.team.postToRoom",+ post_to_thread: "activity.tool.team.postToThread",propose_bot_deletion: "activity.tool.team.proposeBotDeletion",propose_model: "activity.tool.team.proposeModel",propose_profile: "activity.tool.team.proposeProfile",diff --git a/server/drivers/agents-catalog-goldens/bridged.profiles.json b/server/drivers/agents-catalog-goldens/bridged.profiles.jsonindex c32a79843e..e865306edd 100644--- a/server/drivers/agents-catalog-goldens/bridged.profiles.json+++ b/server/drivers/agents-catalog-goldens/bridged.profiles.json@@ -1,7 +1,7 @@{"default": {- "bytes": 18570,- "sha256": "891cc5b70ed96032be3ed27a880597f8214810d5f541805ae3c20b5d39abbde6",+ "bytes": 18637,+ "sha256": "bd5633adbd2d27c088501f66d36f9646d6b73389fb5a989bedc3c969e189687e","tools": ["tool_result_read","list_room_targets",@@ -23,8 +23,8 @@]},"voice": {- "bytes": 19351,- "sha256": "8648a5043bbb5e4d5a6f615c4ce8676014fea422dc3127538a9c09aab6bcaab1",+ "bytes": 19418,+ "sha256": "2e77e2b0e5bbdd0a680e34ff26868c5dde9af91fbad102eef346058ce148a4be","tools": ["tool_result_read","list_room_targets",@@ -47,8 +47,8 @@]},"shared": {- "bytes": 18610,- "sha256": "d6ac0449c16f85cfa3579213da75bd15e5885ee03af4aab56eb845f797ced31a",+ "bytes": 18677,+ "sha256": "86fa7272a75db96283b0a757ebc016eb0441c2d4f9348cdde337b4172fe5d8fd","tools": ["tool_result_read","list_room_targets",@@ -70,8 +70,8 @@]},"shared+voice": {- "bytes": 19391,- "sha256": "30d1155cfe55da51844c89a29b142912ea3be42c97ea7d84cbd16e2b16f8ac25",+ "bytes": 19458,+ "sha256": "3bd9c9df2cc032a7bfb7b3fd41d37c043da2d232e9e1027db8cc6a03414da4ac","tools": ["tool_result_read","list_room_targets",@@ -94,8 +94,8 @@]},"skills": {- "bytes": 18597,- "sha256": "198a02469aec39a0bd88eee329710009e7fba087c2599236529fc04d033cf460",+ "bytes": 18664,+ "sha256": "cf582652de144ef98d4b15578db7637da5fbb0caa5bfef6824b1da07a40bea7f","tools": ["tool_result_read","list_room_targets",@@ -117,8 +117,8 @@]},"skills+voice": {- "bytes": 19378,- "sha256": "59608e1d28a14056a49a57208c1b3fbf86eff202fc756ae9ddf3aa646869b374",+ "bytes": 19445,+ "sha256": "cf5b69982eff9d26ce023c74536b5a95bba950b0a360d5b180309edb2a0ec480","tools": ["tool_result_read","list_room_targets",@@ -141,8 +141,8 @@]},"skills+shared": {- "bytes": 18637,- "sha256": "bd3a2326aa5531191637eab98f23edaf3960ae2dd5b2f02be92cfd97a3967438",+ "bytes": 18704,+ "sha256": "16878530b6f763d383cb3b45e4ea5a01201bfbc5cdcb0554880dd68983450aef","tools": ["tool_result_read","list_room_targets",@@ -164,8 +164,8 @@]},"skills+shared+voice": {- "bytes": 19418,- "sha256": "d773235b8fdd9193463a7d40580d59de286ed6534699007cc0be77e1e4579a77",+ "bytes": 19485,+ "sha256": "3dc053ed1e4b31885ad1d0bf67a9fe11ac05b6f2ef16429c4c66e2923c63ddb8","tools": ["tool_result_read","list_room_targets",@@ -188,8 +188,8 @@]},"non-chief": {- "bytes": 18453,- "sha256": "c7584c88be91cf6b2f3643f938773de9da06e558f0cb6f4aeb8d45aa07c95f60",+ "bytes": 18520,+ "sha256": "f3e7cc0b97226168ce9589d59f0f3dd3132fe91f0022882fc0c9e0034e884026","tools": ["tool_result_read","list_room_targets",@@ -211,8 +211,8 @@]},"voice+non-chief": {- "bytes": 19234,- "sha256": "efa1cbc7eaac2086d0d342f4bb128aab89c71c24b2f957d394d75493811a70b3",+ "bytes": 19301,+ "sha256": "1bb6686a20fde51545b5bf846fe7a3232925b302a025d92a7146ba02dca15035","tools": ["tool_result_read","list_room_targets",@@ -235,8 +235,8 @@]},"shared+non-chief": {- "bytes": 18493,- "sha256": "d64b01134bee668daf0c1a089615c023d275ad79cd18d51fb9fd8b84f8cf27fd",+ "bytes": 18560,+ "sha256": "f3ca904e25c72ece107b0a243f6d124214304f483a0914b1f6500599870b22a8","tools": ["tool_result_read","list_room_targets",@@ -258,8 +258,8 @@]},"shared+voice+non-chief": {- "bytes": 19274,- "sha256": "419e7f167f05162f384b399a925ef45dfcd4e830d6ddd8e1cda897ca697f4b22",+ "bytes": 19341,+ "sha256": "079fb1a937a078e35075e4657b5088d35849939f1f07721418ba67f5f3a9bba2","tools": ["tool_result_read","list_room_targets",@@ -282,8 +282,8 @@]},"skills+non-chief": {- "bytes": 18480,- "sha256": "b262aba574381d4ce25090a3c1ee621a7358d65927ffb42588e7c64afdd52aa6",+ "bytes": 18547,+ "sha256": "ba2a18321de58feb7cc090fd45d47991fe91b1682e095728ead18ce12f1df1ce","tools": ["tool_result_read","list_room_targets",@@ -305,8 +305,8 @@]},"skills+voice+non-chief": {- "bytes": 19261,- "sha256": "18ca481c240d74fa7fc871e9a3e0afaafdb2045cb62346404e766edd2e465a0d",+ "bytes": 19328,+ "sha256": "9575e3d0789f12782ac4a19897cbafa970dcbfb438bf5c152ffe64c2937d1bac","tools": ["tool_result_read","list_room_targets",@@ -329,8 +329,8 @@]},"skills+shared+non-chief": {- "bytes": 18520,- "sha256": "c722ab571ca847f65ad8113bb15f5d7f2be6c7eb95ddd9bb083faaab7da5086d",+ "bytes": 18587,+ "sha256": "3c3b9ccd3ecab92322d25f1d7f756843c9084f691cddc2bf86987b042d8fe2ce","tools": ["tool_result_read","list_room_targets",@@ -352,8 +352,8 @@]},"skills+shared+voice+non-chief": {- "bytes": 19301,- "sha256": "8c273fd3359b73e2dde15e4f3eb3dcc8d80b9c7b5c35800ec6c3865b66dc9738",+ "bytes": 19368,+ "sha256": "2909ecdaa12d1619a5d5fb8170204f9866155e7b7e352449ba579e530dccae36","tools": ["tool_result_read","list_room_targets",@@ -376,8 +376,8 @@]},"skills+shared+voice+cloud-home": {- "bytes": 19434,- "sha256": "58300d5f6448f4f54c783f4c0fc985d012365cf11746f10b3f76096b0f336d0f",+ "bytes": 19501,+ "sha256": "e83a0e7126b4c7cfdddb6dcdaf95f79165d73f77a82f3025a1e8110185c8ec0a","tools": ["tool_result_read","list_room_targets",@@ -400,8 +400,8 @@]},"skills+shared+voice+non-chief+cloud-home": {- "bytes": 19317,- "sha256": "49772352d54c6b7955cc61a3db2d58464f2ff603defc9f76298d31a2c087f3e9",+ "bytes": 19384,+ "sha256": "1e6367ebff5b72c13600db69a056e510a1329f6ed3933541ad45387c86269013","tools": ["tool_result_read","list_room_targets",@@ -424,8 +424,8 @@]},"skills+shared+voice+x": {- "bytes": 19479,- "sha256": "b63332956f10829e4c1e0eff15afec08170d9bb3d1ea392bc2d0c3a22343cd1c",+ "bytes": 19546,+ "sha256": "321f6aceda902d35661c3ae23eb8eda2c1f75bee7a50ed25900763a34aa90673","tools": ["tool_result_read","list_room_targets",@@ -448,8 +448,8 @@]},"skills+shared+voice+x+team": {- "bytes": 19479,- "sha256": "b63332956f10829e4c1e0eff15afec08170d9bb3d1ea392bc2d0c3a22343cd1c",+ "bytes": 19546,+ "sha256": "321f6aceda902d35661c3ae23eb8eda2c1f75bee7a50ed25900763a34aa90673","tools": ["tool_result_read","list_room_targets",@@ -472,8 +472,8 @@]},"skills+shared+voice+x+team+images": {- "bytes": 19495,- "sha256": "29c8dc662c8712ea3148429c53653ef0683b62fa5e14e2046c63a67590a66e79",+ "bytes": 19562,+ "sha256": "a17579ebe14bab30ddebbda74982b6d3bdc54fa964554212ebe6f94fe5ce6f04","tools": ["tool_result_read","list_room_targets",@@ -496,8 +496,8 @@]},"default+legacy-switches": {- "bytes": 18570,- "sha256": "891cc5b70ed96032be3ed27a880597f8214810d5f541805ae3c20b5d39abbde6",+ "bytes": 18637,+ "sha256": "bd5633adbd2d27c088501f66d36f9646d6b73389fb5a989bedc3c969e189687e","tools": ["tool_result_read","list_room_targets",@@ -519,8 +519,8 @@]},"default+mausbot": {- "bytes": 18622,- "sha256": "4eec13562ddffa5fbc46e0f249a38249cc99f470e01fa9a56674a7be9faa402a",+ "bytes": 18689,+ "sha256": "d6a9e63c9b6aed14ca89467f8ec3d55e1746398ddec4a9f6473f226b7a133a12","tools": ["tool_result_read","list_room_targets",@@ -542,8 +542,8 @@]},"skills+shared+voice+mausbot": {- "bytes": 19470,- "sha256": "382e151f0e7b79430e6568791d043feba898703916461bc756a5c5c04635de82",+ "bytes": 19537,+ "sha256": "b031ee1601315c884224a0ef0e83c9195507290d8a5de96b1383f37da9294fd0","tools": ["tool_result_read","list_room_targets",@@ -566,8 +566,8 @@]},"default+no-computer-pick": {- "bytes": 17358,- "sha256": "dad3a68270543fbe7fb6e844effc2be16e8a69a496bafb15f2456c9a4f07665c",+ "bytes": 17425,+ "sha256": "4afb6e99220720f853583f00e76e80aadddd6fce760242107a98b27320a0232b","tools": ["tool_result_read","list_room_targets",@@ -588,8 +588,8 @@]},"default+room": {- "bytes": 17314,- "sha256": "d05af0c430b7edd5c57b8bf78d41b58fd8916b58b5466c20a5bca2d644580d75",+ "bytes": 17381,+ "sha256": "64af829dacc65190d59552bcfd1d4a060973e91e58bfe7f6813ed1badac670f0","tools": ["tool_result_read","list_room_targets",@@ -610,8 +610,8 @@]},"non-chief+room": {- "bytes": 17197,- "sha256": "f9a25d76816c7ebec34cad2b1f2765f19acb54a0c027e0946da39a82c2d5cc80",+ "bytes": 17264,+ "sha256": "0271f30d6fd5d2e3cf169bb57ddf0d215dc5580edab127c75d67c220bb97cca7","tools": ["tool_result_read","list_room_targets",@@ -632,8 +632,8 @@]},"default+images": {- "bytes": 18586,- "sha256": "979857329fd26245e93b690e7f17afb5c418ecc878ff369f361e1de0e7dc9a17",+ "bytes": 18653,+ "sha256": "c551c823abd00efc23f93d311d505594827c32bddaced5bcd943cfbd9c6f27c8","tools": ["tool_result_read","list_room_targets",@@ -655,8 +655,8 @@]},"skills+shared+voice+x+team+images+hosting": {- "bytes": 20697,- "sha256": "f1c655afa47eadcfa87aab3207193b8aa999250d778e725f4b4a011586544b58",+ "bytes": 20764,+ "sha256": "7db2bfa713a3aff3689f625e76bcbdfe2c185a0df57a3ba2cf52522b54525bcf","tools": ["tool_result_read","list_room_targets",@@ -680,8 +680,8 @@]},"default+hosting": {- "bytes": 19772,- "sha256": "53d01dd568b4a74150bb26c6dcd6d50d3a33c4d9ba42cbd01728aa3fc96387a8",+ "bytes": 19839,+ "sha256": "596ee03b5f4aa8871fe0fe5af9e451ea2352890681ac20d1a0ed19866a878460","tools": ["tool_result_read","list_room_targets",diff --git a/server/drivers/agents-catalog-goldens/bridged.tools-list.json b/server/drivers/agents-catalog-goldens/bridged.tools-list.jsonindex 24b5e50d63..3f70204d25 100644--- a/server/drivers/agents-catalog-goldens/bridged.tools-list.json+++ b/server/drivers/agents-catalog-goldens/bridged.tools-list.json@@ -263,7 +263,7 @@"delivery_id": {"type": "string","maxLength": 100,- "description": "Optional: the same id is posted only once."+ "description": "Optional: the same id is posted only once. Reuse it when retrying this call; without it, a retry posts again."}},"required": [diff --git a/server/drivers/agents-catalog-goldens/full.tools-list.json b/server/drivers/agents-catalog-goldens/full.tools-list.jsonindex 607a648025..d18606e749 100644--- a/server/drivers/agents-catalog-goldens/full.tools-list.json+++ b/server/drivers/agents-catalog-goldens/full.tools-list.json@@ -630,7 +630,7 @@"delivery_id": {"type": "string","maxLength": 100,- "description": "Optional: the same id is posted only once."+ "description": "Optional: the same id is posted only once. Reuse it when retrying this call; without it, a retry posts again."}},"required": [diff --git a/server/drivers/agents-catalog-goldens/profiles.json b/server/drivers/agents-catalog-goldens/profiles.jsonindex b871a03ed4..2953d724eb 100644--- a/server/drivers/agents-catalog-goldens/profiles.json+++ b/server/drivers/agents-catalog-goldens/profiles.json@@ -1,7 +1,7 @@{"default": {- "bytes": 62541,- "sha256": "5efd1f9eac438a7e674b3ceb9148d05c036abfa84bd1fb6f35984963ca04a670",+ "bytes": 62608,+ "sha256": "f1d4523860b1c61b2adaa4b7db9133e02f750c722db47702681d0abe98640533","tools": ["tool_result_read","list_room_targets",@@ -54,8 +54,8 @@]},"voice": {- "bytes": 63322,- "sha256": "3699e895d143ab62e10b5e5bab341c45c50e2b758f4802d35ebc8e7b5eabf87b",+ "bytes": 63389,+ "sha256": "470895102c2772f1949608b3a23010f41e2ed06b7bff2127e5beba73a2bc94c4","tools": ["tool_result_read","list_room_targets",@@ -109,8 +109,8 @@]},"shared": {- "bytes": 64806,- "sha256": "9e9335fb04f40c6d2edc2d113d7df33cb237f5b4497c20af7306ddd8c9e0c711",+ "bytes": 64873,+ "sha256": "bbdfc3eb78b7827f2b49a5d919bcd7e976f81004d26d470becc1af27e32631c5","tools": ["tool_result_read","list_shared_computers",@@ -165,8 +165,8 @@]},"shared+voice": {- "bytes": 65587,- "sha256": "071830fc4546bb949ada29fad7581bd8bf3ea6d4e1557a0faf977179f84a9ec0",+ "bytes": 65654,+ "sha256": "2c409cedd20b5ec5b86feafd5da22438ecd87de683bdbe19bf3b9521ed20cb08","tools": ["tool_result_read","list_shared_computers",@@ -222,8 +222,8 @@]},"skills": {- "bytes": 65617,- "sha256": "6f955732cab1f335cd38897a97f38c4cba6277c3bdc1190ec4f92f15bea10a66",+ "bytes": 65684,+ "sha256": "1ec437f5032756e8549a952ef5af8ff84ff08faf4107b5c46be2692bae205bbb","tools": ["tool_result_read","list_room_targets",@@ -278,8 +278,8 @@]},"skills+voice": {- "bytes": 66398,- "sha256": "405a8e64cfe354bfc9db0d553179b613b2436b9629a76624579a78d7b2e70c78",+ "bytes": 66465,+ "sha256": "94d269b7a2d1619db071e0c6961da6c5595c6ab5747cbaeb9c5b1358ba9292cc","tools": ["tool_result_read","list_room_targets",@@ -335,8 +335,8 @@]},"skills+shared": {- "bytes": 67882,- "sha256": "d88ecaf16b20493ebdf4a2151ed1298eeb59d0015597d5287c4029637ee21904",+ "bytes": 67949,+ "sha256": "283f7ebbdca36e8c3dba864ddeb7f0890af913fe4569d0fc634efe505cac5a94","tools": ["tool_result_read","list_shared_computers",@@ -393,8 +393,8 @@]},"skills+shared+voice": {- "bytes": 68663,- "sha256": "a171b7181a13a5d6b710fc7b74c866cda375bc0114eb4aca673a8177ed2cc19b",+ "bytes": 68730,+ "sha256": "72b80a89d524e279fc3a44524c99341b1d589da6c1255f53e2ca17a7868d9912","tools": ["tool_result_read","list_shared_computers",@@ -452,8 +452,8 @@]},"non-chief": {- "bytes": 53192,- "sha256": "afa0a1d810522c08e75625a14821c80a36d415e83a06a6b1a0dde7f7f73668ec",+ "bytes": 53259,+ "sha256": "7b47aed0e06da2ad4fa0c35b13e0c45d217b339545a4cb8a384b45f31fe534fe","tools": ["tool_result_read","list_room_targets",@@ -499,8 +499,8 @@]},"voice+non-chief": {- "bytes": 53973,- "sha256": "23d733261316e5f72a33a7eac2faf81a3f05daa08a51c60a507ee9da32f26f99",+ "bytes": 54040,+ "sha256": "be9ac66833717c13cc7547b5652abcf569466fbf5aad1f405e3c6f813f24af7b","tools": ["tool_result_read","list_room_targets",@@ -547,8 +547,8 @@]},"shared+non-chief": {- "bytes": 55457,- "sha256": "cfd8a6359232373eed4901eadd73e9fe503868b615c4242541eda2f1b969cf97",+ "bytes": 55524,+ "sha256": "c8fb4927d02b444ce93edd430f711820de919bdd89610a9a94b121d13161d25c","tools": ["tool_result_read","list_shared_computers",@@ -596,8 +596,8 @@]},"shared+voice+non-chief": {- "bytes": 56238,- "sha256": "e6a507f732dc7fb76fb1f1a337b0d76b77636cfe294d55cf4650aad48c8d8568",+ "bytes": 56305,+ "sha256": "5960a0f4294403c5e601cf132a484c904e9ee66097d70ef3d05965f7d4f3ab03","tools": ["tool_result_read","list_shared_computers",@@ -646,8 +646,8 @@]},"skills+non-chief": {- "bytes": 56268,- "sha256": "1ffa9d5e602b16c0fd8df92f445ab65a08d216e51e551ccaa6e3217a02341183",+ "bytes": 56335,+ "sha256": "ca2618f4fa0a616677b4fdacb5a5bbe2261c95d7b48b17e1162d503376e88fa0","tools": ["tool_result_read","list_room_targets",@@ -695,8 +695,8 @@]},"skills+voice+non-chief": {- "bytes": 57049,- "sha256": "d40ce0e9bb24c20685566ed7673e0d57964a8d3f81d124f7933117e49a60ae5e",+ "bytes": 57116,+ "sha256": "865bdcaf25870ff0f4baea6e5fc79c5ab9345b9269435607ea3d8ba58e66acbe","tools": ["tool_result_read","list_room_targets",@@ -745,8 +745,8 @@]},"skills+shared+non-chief": {- "bytes": 58533,- "sha256": "b54f440f824bf0ffe2b8e5b469cf09094e46a9d311991c23bdf028faf3d2440c",+ "bytes": 58600,+ "sha256": "98b0bce782395aec1058815fcfda54653508d0d637325ef0ad9dd45c44458dd4","tools": ["tool_result_read","list_shared_computers",@@ -796,8 +796,8 @@]},"skills+shared+voice+non-chief": {- "bytes": 59314,- "sha256": "fc3ce28d6993c41723f91eb3972b3018e15000c44a1a24060f503926d9185410",+ "bytes": 59381,+ "sha256": "8b0bbc40ae4efbc5369280b05c79921c391105511e34945987aa3ad894b29b3d","tools": ["tool_result_read","list_shared_computers",@@ -848,8 +848,8 @@]},"skills+shared+voice+cloud-home": {- "bytes": 68429,- "sha256": "21339248d3f5772769a61cd2cbe73bf807478caa77b20d0006de283b89dde940",+ "bytes": 68496,+ "sha256": "c5f9f57ded1b87c894a38f9aabc9c6213963324c97a8c11c9cc0b6fae08aaa6c","tools": ["tool_result_read","list_shared_computers",@@ -907,8 +907,8 @@]},"skills+shared+voice+non-chief+cloud-home": {- "bytes": 59080,- "sha256": "b870b177327f05a45e7c20c98998470154911e0e9aa4a279e1842d1836d621d0",+ "bytes": 59147,+ "sha256": "1b512de81df9125c72dda90b08b8e9d3cf8f43af5035cead394f5c0e9b86309c","tools": ["tool_result_read","list_shared_computers",@@ -959,8 +959,8 @@]},"skills+shared+voice+x": {- "bytes": 72502,- "sha256": "5e6e3ee0e0d1d9c130b6fd41d6ccac1d479842633ad37f7198fccc8d3a3026ed",+ "bytes": 72569,+ "sha256": "07162b3a789fd2b0cf577e1338fedd2142b5cbb855a6f6c1824f2f8bd0037c61","tools": ["tool_result_read","list_shared_computers",@@ -1022,8 +1022,8 @@]},"skills+shared+voice+x+team": {- "bytes": 72502,- "sha256": "5e6e3ee0e0d1d9c130b6fd41d6ccac1d479842633ad37f7198fccc8d3a3026ed",+ "bytes": 72569,+ "sha256": "07162b3a789fd2b0cf577e1338fedd2142b5cbb855a6f6c1824f2f8bd0037c61","tools": ["tool_result_read","list_shared_computers",@@ -1085,8 +1085,8 @@]},"skills+shared+voice+x+team+images": {- "bytes": 73275,- "sha256": "bc78606204cd033a90b280f8691f6bf46299bb0350679d90568424342df5574e",+ "bytes": 73342,+ "sha256": "eaa5183876f7b8d42e90d676074df7fad7a24fedb0886c5207685ac57babc163","tools": ["tool_result_read","list_shared_computers",@@ -1149,8 +1149,8 @@]},"default+legacy-switches": {- "bytes": 62541,- "sha256": "5efd1f9eac438a7e674b3ceb9148d05c036abfa84bd1fb6f35984963ca04a670",+ "bytes": 62608,+ "sha256": "f1d4523860b1c61b2adaa4b7db9133e02f750c722db47702681d0abe98640533","tools": ["tool_result_read","list_room_targets",@@ -1203,8 +1203,8 @@]},"default+mausbot": {- "bytes": 63192,- "sha256": "d2339ac33c7cd0723e9919ebe0e6b7f96fdb9a5a4ba9c4c29d29086fe664d237",+ "bytes": 63259,+ "sha256": "6c0b3ed8f844637e4359c0f72328a540a5dc35e5693d571d6d504caaaa402fa4","tools": ["tool_result_read","list_room_targets",@@ -1259,8 +1259,8 @@]},"skills+shared+voice+mausbot": {- "bytes": 69314,- "sha256": "8bbb6cbf47b16737aa5096168e25cc492368a40d8ec2c3ff38db587d1d511b46",+ "bytes": 69381,+ "sha256": "a57a2ccb5731021cfddb46d6ba893234f2640582f9b0337fab9187522f33fcc6","tools": ["tool_result_read","list_shared_computers",@@ -1320,8 +1320,8 @@]},"default+no-computer-pick": {- "bytes": 61329,- "sha256": "ad04ce9659d8455cd6c5777cecdf28a01790df502eb1e0b4ebe54622d8078996",+ "bytes": 61396,+ "sha256": "78338264c24cbd2a36dccb5f8b656baa48213c50182477a0ae7a309e18649dd6","tools": ["tool_result_read","list_room_targets",@@ -1373,8 +1373,8 @@]},"default+room": {- "bytes": 58831,- "sha256": "2e54f454d0b220e491ccd88acc06418c9dec7310bac265906ac7e0a5c503d13f",+ "bytes": 58898,+ "sha256": "18943e489f6006debc19e59feef57a072529d57ac888ee5a686fe0c2f16184b5","tools": ["tool_result_read","list_room_targets",@@ -1422,8 +1422,8 @@]},"non-chief+room": {- "bytes": 49482,- "sha256": "92559c241536df726ab8ee8046d0601d0d540e09ea3ef9a8f199817d37eab203",+ "bytes": 49549,+ "sha256": "78c1cf552ccfe0d220bc0e90557157583fda155b5802ecfe186965dc95d2dfa5","tools": ["tool_result_read","list_room_targets",@@ -1464,8 +1464,8 @@]},"default+images": {- "bytes": 63314,- "sha256": "7abe033bc46d3a20e86c91cd792fb0fa1838364f436fd20e69d92b8ddaca7169",+ "bytes": 63381,+ "sha256": "0be3620bbae48614033820cff076ed590ea2bbb60af9385900d0597ec12430de","tools": ["tool_result_read","list_room_targets",@@ -1519,8 +1519,8 @@]},"skills+shared+voice+x+team+images+hosting": {- "bytes": 75138,- "sha256": "6af895833744895f877d5f3ce0b74f129814b67cb45a8a9075dfdd6f5625a647",+ "bytes": 75205,+ "sha256": "f133a45f2567047bb25ac56308a4b921ba11ad9b66bfcfbbcdc49a8a52bfa87e","tools": ["tool_result_read","list_shared_computers",@@ -1585,8 +1585,8 @@]},"default+hosting": {- "bytes": 64404,- "sha256": "f7ec0c7fe2f4bc92e1a8c5473d667a9a916827cc3731e6bd6dc7808fe8d43828",+ "bytes": 64471,+ "sha256": "4573e52bb9d0448ef002d0142b6c6c4a2baf8ce9d222ed23094dc7c554383159","tools": ["tool_result_read","list_room_targets",diff --git a/server/drivers/agents-thread-post-tool.ts b/server/drivers/agents-thread-post-tool.tsindex 0126970bba..876b6c40c0 100644--- a/server/drivers/agents-thread-post-tool.ts+++ b/server/drivers/agents-thread-post-tool.ts@@ -19,7 +19,7 @@ export async function callThreadPostTool(args: Json, context: ToolCallContext):return {text: r.duplicate === true? `Already posted in ${where} with delivery_id ${String(r.deliveryId)}; not posted again.`- : `Posted in ${where} (delivery_id ${String(r.deliveryId)}). ${r.woke === true ? "A run started there; nothing comes back to you." : "Nothing started: it is read on that thread's next run."}`,+ : `Posted in ${where} (delivery_id ${String(r.deliveryId)}). ${r.woke === true ? "Wake requested: that thread reads it in its running turn or its next run; nothing comes back to you." : "Nothing started: it is read on that thread's next run."}`,};}@@ -34,7 +34,7 @@ export const THREAD_POST_TOOL_DEFINITION = {thread_id: { type: "string", description: "From list_threads." },message: { type: "string", maxLength: 8000, description: "The complete message." },wake: { type: "boolean", description: "True: start a run there now." },- delivery_id: { type: "string", maxLength: 100, description: "Optional: the same id is posted only once." },+ delivery_id: { type: "string", maxLength: 100, description: "Optional: the same id is posted only once. Reuse it when retrying this call; without it, a retry posts again." },},required: ["thread_id", "message"],},diff --git a/server/host/thread-posts.test.ts b/server/host/thread-posts.test.tsindex 3769e7c5bc..93ac0c65dc 100644--- a/server/host/thread-posts.test.ts+++ b/server/host/thread-posts.test.ts@@ -1,7 +1,7 @@import { describe, expect, it } from "vitest";import type { WireMessage as Message } from "../../shared/wire.ts";-import { deliveryIdProblem, findThreadPost, threadPostRow, unreadThreadPosts } from "./thread-posts.ts";+import { deliveryIdProblem, findThreadPost, postToThread, threadPostRow, unreadThreadPosts } from "./thread-posts.ts";const from = { id: "bot-a", name: "Researcher", color: "#123" };const row = (id: string, text: string, deliveryId = id, seen = false): Message => {@@ -48,4 +48,39 @@ describe("thread posts", () => {expect(read.text.split("\n").filter((line) => line.startsWith("[From"))).toHaveLength(1);expect(read.text).not.toContain("[From the person");});++ describe("the post route", () => {+ const deps = (sender: string, rooms: string[] = []) => {+ const calls: unknown[] = [];+ return { calls, deps: {+ senderId: sender, fromThreadId: "from-run", waitsOn: () => false,+ store: { botByThread: (id: string) => (id.startsWith("t-") ? { id: "bot-b", name: "Writer" } : undefined),+ groupByThread: (id: string) => (rooms.includes(id) ? { id: "room" } : undefined), messagesFor: () => [] },+ coordinateBots: async (call: unknown) => { calls.push(call); return { status: 200, body: { receipts: [{ outcome: "delivered", requestId: "r1" }] } }; },+ } as unknown as Parameters<typeof postToThread>[1] };+ };++ it("posts a retry with the same delivery id only once", async () => {+ const { calls, deps: d } = deps("sender-retry");+ const body = { toThreadId: "t-1", message: "hi", wake: true, deliveryId: "retry-1" };+ expect((await postToThread(body, d)).body.woke).toBe(true);+ expect((await postToThread(body, d)).body.duplicate).toBe(true);+ expect(calls).toHaveLength(1);+ });++ it("refuses a delivery id reused for another thread instead of calling it a duplicate", async () => {+ const { calls, deps: d } = deps("sender-reuse");+ await postToThread({ toThreadId: "t-1", message: "hi", deliveryId: "same" }, d);+ const second = await postToThread({ toThreadId: "t-2", message: "hi", deliveryId: "same" }, d);+ expect(second.status).toBe(409);+ expect(second.body.duplicate).toBeUndefined();+ expect(calls).toHaveLength(1);+ });++ it("refuses a call made from a room", async () => {+ const { calls, deps: d } = deps("sender-room", ["from-run"]);+ expect((await postToThread({ toThreadId: "t-1", message: "hi" }, d)).status).toBe(409);+ expect(calls).toHaveLength(0);+ });+ });});diff --git a/server/host/thread-posts.ts b/server/host/thread-posts.tsindex ce26b5a5ac..bc955f182c 100644--- a/server/host/thread-posts.ts+++ b/server/host/thread-posts.ts@@ -73,7 +73,7 @@ const PostBody = z.object({wake: z.boolean().default(false),deliveryId: z.string().trim().optional(),});-/** Deliveries by sender and delivery id, so a retry is not posted twice (a no-wake post is also found in its thread). */+/** Thread each delivery went to, by sender and delivery id, so a retry is not posted twice (a no-wake post is also found in its thread). */const deliveries = new Map<string, string>();/** POST /api/internal/post-to-thread: checks the call and sends it through coordinate_bots as a post, so its reach rules hold. */@@ -82,6 +82,7 @@ export async function postToThread(body: unknown, deps: { senderId: string; fromconst refuse = (status: number, error: string): Reply => ({ status, body: { error } });const parsed = PostBody.safeParse(body);if (!parsed.success) return refuse(400, `Give thread_id (from list_threads) and a message of 1-${THREAD_POST_MAX_CHARS} characters; wake is true or false.`);+ if (deps.store.groupByThread(deps.fromThreadId)) return refuse(409, "Rooms cannot post into another thread: use coordinate_bots in this room.");const { toThreadId: threadId, message, wake } = parsed.data, deliveryId = parsed.data.deliveryId || randomUUID();const badId = deliveryIdProblem(deliveryId);if (badId) return refuse(400, badId);@@ -89,8 +90,9 @@ export async function postToThread(body: unknown, deps: { senderId: string; fromif (!owner || deps.store.groupByThread(threadId)) return refuse(404, "No open thread with that id: use a thread id list_threads shows. Rooms take post_to_room.");if (threadId === deps.fromThreadId) return refuse(409, "That is this conversation: say it in your reply instead.");if (deps.waitsOn(threadId)) return refuse(403, "That thread is waiting on this one: end your turn and your reply reaches it.");- const key = `${deps.senderId}\u0000${deliveryId}`;- if (deliveries.has(key) || findThreadPost(deps.store.messagesFor(threadId), deps.senderId, deliveryId)) {+ const key = `${deps.senderId}\u0000${deliveryId}`, sentTo = deliveries.get(key);+ if (sentTo !== undefined && sentTo !== threadId) return refuse(409, "That delivery_id was already used for another thread: use a new delivery_id.");+ if (sentTo !== undefined || findThreadPost(deps.store.messagesFor(threadId), deps.senderId, deliveryId)) {return { status: 200, body: { deliveryId, threadId, botName: owner.name, duplicate: true, message: "Already delivered with this delivery_id; not posted again." } };}const result = await deps.coordinateBots({ botIds: [owner.id], message, rework: false, thread: threadId, reply: "none", consult: false, post: { deliveryId, wake } });@@ -98,7 +100,7 @@ export async function postToThread(body: unknown, deps: { senderId: string; fromif (result.status !== 200 || !receipt || receipt.outcome === "failed") {return refuse(result.status === 200 ? 409 : result.status, String(receipt?.detail ?? result.body.error ?? "Not delivered."));}- deliveries.set(key, receipt.requestId ?? deliveryId);+ deliveries.set(key, threadId);if (deliveries.size > 1_000) deliveries.delete(deliveries.keys().next().value!);return { status: 200, body: { deliveryId, threadId, botName: owner.name, woke: wake,message: wake ? `Delivered; that thread runs it ${receipt.outcome === "injected" ? "in its running turn" : "next"}. Nothing comes back to you.` : "Posted; nothing started there. That thread reads it on its next run." } };diff --git a/server/index.ts b/server/index.tsindex e9e153b3c1..da401363f4 100644--- a/server/index.ts+++ b/server/index.ts@@ -8441,7 +8441,7 @@ async function beginTurn(variant,resumeCursor: dispatchContext.resumeCursor,sessionReset: dispatchContext.sessionReset,- ...(dispatchContext.recoveryText !== undefined ? { recoveryText: withTurnClock(clock, attachmentsForBox(dispatchContext.recoveryText, cwd) + shareNote.text) } : {}),+ ...(dispatchContext.recoveryText !== undefined ? { recoveryText: withTurnClock(clock, (posted?.text ?? "") + attachmentsForBox(dispatchContext.recoveryText, cwd) + shareNote.text) } : {}),transcript,system: prompt.text,systemStable: prompt.stable,diff --git a/src/locales/en.json b/src/locales/en.jsonindex 9000f4f44f..48d116414b 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -9168,6 +9168,7 @@"activity.tool.team.memoryLog": "Memory log","activity.tool.team.memoryUpdate": "Memory update","activity.tool.team.postToRoom": "Post to room",+ "activity.tool.team.postToThread": "Post to thread","activity.tool.team.proposeBotDeletion": "Propose bot deletion","activity.tool.team.proposeModel": "Propose model","activity.tool.team.proposeProfile": "Propose profile",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 14adb4d195..48dd6a9e90 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -9128,6 +9128,7 @@"activity.tool.team.memoryLog": "Registrar na memória","activity.tool.team.memoryUpdate": "Atualizar memória","activity.tool.team.postToRoom": "Postar no grupo",+ "activity.tool.team.postToThread": "Postar em outra conversa","activity.tool.team.proposeBotDeletion": "Propor excluir um bot","activity.tool.team.proposeModel": "Propor modelo","activity.tool.team.proposeProfile": "Propor perfil",diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.jsonindex d090924706..27ebcc0c39 100644--- a/src/locales/source-hashes.json+++ b/src/locales/source-hashes.json@@ -34511,6 +34511,7 @@"activity.tool.team.memoryLog": "78a797644634d441d8549e17e83046407f1899e061e45e611aab1ad7ddc2059b","activity.tool.team.memoryUpdate": "cf271c896ae4d0f92eee42eeede23f3efd9d2aaa75e7e9ddffda094db690313a","activity.tool.team.postToRoom": "ad3bedd03e21fd646efd08298e75d4d52d135602620c2365d811cd06772de10e",+ "activity.tool.team.postToThread": "64810ac0d032cd28c4ab50118194976b7078e4489294d16423c5d08a061ed914","activity.tool.team.proposeBotDeletion": "0772d5bf4ce13606e3ca4f240945244b5669eab72e2dc9f6d604a4a5abe86d7c","activity.tool.team.proposeModel": "ef78f2ccf8e104682c487e1d0efe07ea040a3117d5159f0f0281da36d6110d49","activity.tool.team.proposeProfile": "9cf9f41dd2f049a71875047909b5f43a2c8040cd4a94c531cbf4f9d667f909ad",@@ -53241,6 +53242,7 @@"activity.tool.team.memoryLog": "78a797644634d441d8549e17e83046407f1899e061e45e611aab1ad7ddc2059b","activity.tool.team.memoryUpdate": "cf271c896ae4d0f92eee42eeede23f3efd9d2aaa75e7e9ddffda094db690313a","activity.tool.team.postToRoom": "ad3bedd03e21fd646efd08298e75d4d52d135602620c2365d811cd06772de10e",+ "activity.tool.team.postToThread": "64810ac0d032cd28c4ab50118194976b7078e4489294d16423c5d08a061ed914","activity.tool.team.proposeBotDeletion": "0772d5bf4ce13606e3ca4f240945244b5669eab72e2dc9f6d604a4a5abe86d7c","activity.tool.team.proposeModel": "ef78f2ccf8e104682c487e1d0efe07ea040a3117d5159f0f0281da36d6110d49","activity.tool.team.proposeProfile": "9cf9f41dd2f049a71875047909b5f43a2c8040cd4a94c531cbf4f9d667f909ad",diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex c6ffb126d4..31cdb10a1e 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -8730,6 +8730,7 @@"activity.tool.team.memoryLog": "記憶日誌","activity.tool.team.memoryUpdate": "更新記憶","activity.tool.team.postToRoom": "發布到房間",+ "activity.tool.team.postToThread": "發布到對話串","activity.tool.team.proposeBotDeletion": "提議刪除機器人","activity.tool.team.proposeModel": "提議模型","activity.tool.team.proposeProfile": "提議個人檔案",