daycare-cli 2026.2.26 → 2026.2.28

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.
Files changed (402) hide show
  1. package/dist/config/configResolve.d.ts.map +1 -1
  2. package/dist/config/configResolve.js +15 -1
  3. package/dist/config/configResolve.js.map +1 -1
  4. package/dist/config/configResolve.spec.js +47 -0
  5. package/dist/config/configResolve.spec.js.map +1 -1
  6. package/dist/config/configSettingsParse.d.ts.map +1 -1
  7. package/dist/config/configSettingsParse.js +10 -0
  8. package/dist/config/configSettingsParse.js.map +1 -1
  9. package/dist/config/configSettingsParse.spec.js +32 -0
  10. package/dist/config/configSettingsParse.spec.js.map +1 -1
  11. package/dist/config/configTypes.d.ts +2 -1
  12. package/dist/config/configTypes.d.ts.map +1 -1
  13. package/dist/engine/agents/agent.d.ts +2 -0
  14. package/dist/engine/agents/agent.d.ts.map +1 -1
  15. package/dist/engine/agents/agent.js +18 -3
  16. package/dist/engine/agents/agent.js.map +1 -1
  17. package/dist/engine/agents/agentSystem.d.ts +5 -0
  18. package/dist/engine/agents/agentSystem.d.ts.map +1 -1
  19. package/dist/engine/agents/agentSystem.js +16 -1
  20. package/dist/engine/agents/agentSystem.js.map +1 -1
  21. package/dist/engine/agents/agentSystem.spec.js +59 -0
  22. package/dist/engine/agents/agentSystem.spec.js.map +1 -1
  23. package/dist/engine/agents/ops/agentLoopRun.d.ts +0 -2
  24. package/dist/engine/agents/ops/agentLoopRun.d.ts.map +1 -1
  25. package/dist/engine/agents/ops/agentLoopRun.js +4 -7
  26. package/dist/engine/agents/ops/agentLoopRun.js.map +1 -1
  27. package/dist/engine/agents/ops/agentLoopRun.spec.js +21 -24
  28. package/dist/engine/agents/ops/agentLoopRun.spec.js.map +1 -1
  29. package/dist/engine/agents/ops/agentSystemPromptContext.d.ts +1 -1
  30. package/dist/engine/agents/ops/agentSystemPromptContext.d.ts.map +1 -1
  31. package/dist/engine/agents/ops/agentSystemPromptSectionEnvironment.d.ts.map +1 -1
  32. package/dist/engine/agents/ops/agentSystemPromptSectionEnvironment.js +12 -1
  33. package/dist/engine/agents/ops/agentSystemPromptSectionEnvironment.js.map +1 -1
  34. package/dist/engine/agents/ops/agentSystemPromptSectionMemory.d.ts.map +1 -1
  35. package/dist/engine/agents/ops/agentSystemPromptSectionMemory.js +0 -4
  36. package/dist/engine/agents/ops/agentSystemPromptSectionMemory.js.map +1 -1
  37. package/dist/engine/agents/ops/agentSystemPromptSectionPermissions.d.ts +2 -2
  38. package/dist/engine/agents/ops/agentSystemPromptSectionPermissions.d.ts.map +1 -1
  39. package/dist/engine/agents/ops/agentSystemPromptSectionPermissions.js +12 -30
  40. package/dist/engine/agents/ops/agentSystemPromptSectionPermissions.js.map +1 -1
  41. package/dist/engine/apps/appExecute.spec.js +2 -10
  42. package/dist/engine/apps/appExecute.spec.js.map +1 -1
  43. package/dist/engine/apps/appInstallToolBuild.js +1 -1
  44. package/dist/engine/apps/appInstallToolBuild.js.map +1 -1
  45. package/dist/engine/apps/appInstallToolBuild.spec.js +1 -5
  46. package/dist/engine/apps/appInstallToolBuild.spec.js.map +1 -1
  47. package/dist/engine/apps/appRuleToolBuild.spec.js +1 -5
  48. package/dist/engine/apps/appRuleToolBuild.spec.js.map +1 -1
  49. package/dist/engine/apps/appToolExecutorBuild.spec.js +1 -5
  50. package/dist/engine/apps/appToolExecutorBuild.spec.js.map +1 -1
  51. package/dist/engine/engine.d.ts.map +1 -1
  52. package/dist/engine/engine.js +10 -0
  53. package/dist/engine/engine.js.map +1 -1
  54. package/dist/engine/friends/nametagGenerate.d.ts +6 -0
  55. package/dist/engine/friends/nametagGenerate.d.ts.map +1 -0
  56. package/dist/engine/friends/nametagGenerate.js +9 -0
  57. package/dist/engine/friends/nametagGenerate.js.map +1 -0
  58. package/dist/engine/friends/nametagGenerate.spec.d.ts +2 -0
  59. package/dist/engine/friends/nametagGenerate.spec.d.ts.map +1 -0
  60. package/dist/engine/friends/nametagGenerate.spec.js +18 -0
  61. package/dist/engine/friends/nametagGenerate.spec.js.map +1 -0
  62. package/dist/engine/modules/executablePrompts/executablePromptExpand.spec.js +1 -5
  63. package/dist/engine/modules/executablePrompts/executablePromptExpand.spec.js.map +1 -1
  64. package/dist/engine/modules/monty/montyPythonTypeFromSchemaRuntime.spec.js +1 -5
  65. package/dist/engine/modules/monty/montyPythonTypeFromSchemaRuntime.spec.js.map +1 -1
  66. package/dist/engine/modules/rlm/rlmExecute.spec.js +1 -5
  67. package/dist/engine/modules/rlm/rlmExecute.spec.js.map +1 -1
  68. package/dist/engine/modules/rlm/rlmPromptSkills.spec.js +9 -9
  69. package/dist/engine/modules/rlm/rlmPromptSkills.spec.js.map +1 -1
  70. package/dist/engine/modules/rlm/rlmRestore.spec.js +1 -5
  71. package/dist/engine/modules/rlm/rlmRestore.spec.js.map +1 -1
  72. package/dist/engine/modules/rlm/rlmTool.spec.js +1 -5
  73. package/dist/engine/modules/rlm/rlmTool.spec.js.map +1 -1
  74. package/dist/engine/modules/say/sayFileResolve.d.ts +4 -5
  75. package/dist/engine/modules/say/sayFileResolve.d.ts.map +1 -1
  76. package/dist/engine/modules/say/sayFileResolve.js +24 -14
  77. package/dist/engine/modules/say/sayFileResolve.js.map +1 -1
  78. package/dist/engine/modules/say/sayFileResolve.spec.js +28 -29
  79. package/dist/engine/modules/say/sayFileResolve.spec.js.map +1 -1
  80. package/dist/engine/modules/toolResolver.spec.js +1 -5
  81. package/dist/engine/modules/toolResolver.spec.js.map +1 -1
  82. package/dist/engine/modules/tools/agentCompactTool.spec.js +1 -5
  83. package/dist/engine/modules/tools/agentCompactTool.spec.js.map +1 -1
  84. package/dist/engine/modules/tools/agentResetTool.spec.js +1 -5
  85. package/dist/engine/modules/tools/agentResetTool.spec.js.map +1 -1
  86. package/dist/engine/modules/tools/background.spec.js +3 -11
  87. package/dist/engine/modules/tools/background.spec.js.map +1 -1
  88. package/dist/engine/modules/tools/channelCreateTool.spec.js +1 -5
  89. package/dist/engine/modules/tools/channelCreateTool.spec.js.map +1 -1
  90. package/dist/engine/modules/tools/channelHistoryTool.spec.js +1 -5
  91. package/dist/engine/modules/tools/channelHistoryTool.spec.js.map +1 -1
  92. package/dist/engine/modules/tools/channelMemberTool.spec.js +1 -5
  93. package/dist/engine/modules/tools/channelMemberTool.spec.js.map +1 -1
  94. package/dist/engine/modules/tools/channelSendTool.spec.js +1 -5
  95. package/dist/engine/modules/tools/channelSendTool.spec.js.map +1 -1
  96. package/dist/engine/modules/tools/friendAddToolBuild.d.ts +7 -0
  97. package/dist/engine/modules/tools/friendAddToolBuild.d.ts.map +1 -0
  98. package/dist/engine/modules/tools/friendAddToolBuild.js +160 -0
  99. package/dist/engine/modules/tools/friendAddToolBuild.js.map +1 -0
  100. package/dist/engine/modules/tools/friendAddToolBuild.spec.d.ts +2 -0
  101. package/dist/engine/modules/tools/friendAddToolBuild.spec.d.ts.map +1 -0
  102. package/dist/engine/modules/tools/friendAddToolBuild.spec.js +151 -0
  103. package/dist/engine/modules/tools/friendAddToolBuild.spec.js.map +1 -0
  104. package/dist/engine/modules/tools/friendRemoveToolBuild.d.ts +7 -0
  105. package/dist/engine/modules/tools/friendRemoveToolBuild.d.ts.map +1 -0
  106. package/dist/engine/modules/tools/friendRemoveToolBuild.js +171 -0
  107. package/dist/engine/modules/tools/friendRemoveToolBuild.js.map +1 -0
  108. package/dist/engine/modules/tools/friendRemoveToolBuild.spec.d.ts +2 -0
  109. package/dist/engine/modules/tools/friendRemoveToolBuild.spec.d.ts.map +1 -0
  110. package/dist/engine/modules/tools/friendRemoveToolBuild.spec.js +172 -0
  111. package/dist/engine/modules/tools/friendRemoveToolBuild.spec.js.map +1 -0
  112. package/dist/engine/modules/tools/friendSendToolBuild.d.ts +7 -0
  113. package/dist/engine/modules/tools/friendSendToolBuild.d.ts.map +1 -0
  114. package/dist/engine/modules/tools/friendSendToolBuild.js +101 -0
  115. package/dist/engine/modules/tools/friendSendToolBuild.js.map +1 -0
  116. package/dist/engine/modules/tools/friendSendToolBuild.spec.d.ts +2 -0
  117. package/dist/engine/modules/tools/friendSendToolBuild.spec.d.ts.map +1 -0
  118. package/dist/engine/modules/tools/friendSendToolBuild.spec.js +120 -0
  119. package/dist/engine/modules/tools/friendSendToolBuild.spec.js.map +1 -0
  120. package/dist/engine/modules/tools/friendShareSubuserToolBuild.d.ts +7 -0
  121. package/dist/engine/modules/tools/friendShareSubuserToolBuild.d.ts.map +1 -0
  122. package/dist/engine/modules/tools/friendShareSubuserToolBuild.js +127 -0
  123. package/dist/engine/modules/tools/friendShareSubuserToolBuild.js.map +1 -0
  124. package/dist/engine/modules/tools/friendShareSubuserToolBuild.spec.d.ts +2 -0
  125. package/dist/engine/modules/tools/friendShareSubuserToolBuild.spec.d.ts.map +1 -0
  126. package/dist/engine/modules/tools/friendShareSubuserToolBuild.spec.js +119 -0
  127. package/dist/engine/modules/tools/friendShareSubuserToolBuild.spec.js.map +1 -0
  128. package/dist/engine/modules/tools/friendUnshareSubuserToolBuild.d.ts +7 -0
  129. package/dist/engine/modules/tools/friendUnshareSubuserToolBuild.d.ts.map +1 -0
  130. package/dist/engine/modules/tools/friendUnshareSubuserToolBuild.js +115 -0
  131. package/dist/engine/modules/tools/friendUnshareSubuserToolBuild.js.map +1 -0
  132. package/dist/engine/modules/tools/friendUnshareSubuserToolBuild.spec.d.ts +2 -0
  133. package/dist/engine/modules/tools/friendUnshareSubuserToolBuild.spec.d.ts.map +1 -0
  134. package/dist/engine/modules/tools/friendUnshareSubuserToolBuild.spec.js +100 -0
  135. package/dist/engine/modules/tools/friendUnshareSubuserToolBuild.spec.js.map +1 -0
  136. package/dist/engine/modules/tools/image-generation.d.ts.map +1 -1
  137. package/dist/engine/modules/tools/image-generation.js +26 -10
  138. package/dist/engine/modules/tools/image-generation.js.map +1 -1
  139. package/dist/engine/modules/tools/image-generation.spec.js +13 -10
  140. package/dist/engine/modules/tools/image-generation.spec.js.map +1 -1
  141. package/dist/engine/modules/tools/mermaid-png.d.ts.map +1 -1
  142. package/dist/engine/modules/tools/mermaid-png.js +16 -11
  143. package/dist/engine/modules/tools/mermaid-png.js.map +1 -1
  144. package/dist/engine/modules/tools/mermaid-png.spec.js +20 -24
  145. package/dist/engine/modules/tools/mermaid-png.spec.js.map +1 -1
  146. package/dist/engine/modules/tools/pdf-process.d.ts.map +1 -1
  147. package/dist/engine/modules/tools/pdf-process.js +10 -38
  148. package/dist/engine/modules/tools/pdf-process.js.map +1 -1
  149. package/dist/engine/modules/tools/pdf-process.spec.js +15 -5
  150. package/dist/engine/modules/tools/pdf-process.spec.js.map +1 -1
  151. package/dist/engine/modules/tools/permanentAgentToolBuild.spec.js +5 -13
  152. package/dist/engine/modules/tools/permanentAgentToolBuild.spec.js.map +1 -1
  153. package/dist/engine/modules/tools/send-file.d.ts.map +1 -1
  154. package/dist/engine/modules/tools/send-file.js +20 -11
  155. package/dist/engine/modules/tools/send-file.js.map +1 -1
  156. package/dist/engine/modules/tools/sendUserMessageTool.spec.js +1 -5
  157. package/dist/engine/modules/tools/sendUserMessageTool.spec.js.map +1 -1
  158. package/dist/engine/modules/tools/sessionHistoryToolBuild.spec.js +1 -2
  159. package/dist/engine/modules/tools/sessionHistoryToolBuild.spec.js.map +1 -1
  160. package/dist/engine/modules/tools/signal.spec.js +1 -5
  161. package/dist/engine/modules/tools/signal.spec.js.map +1 -1
  162. package/dist/engine/modules/tools/signalEventsCsvToolBuild.spec.js +1 -5
  163. package/dist/engine/modules/tools/signalEventsCsvToolBuild.spec.js.map +1 -1
  164. package/dist/engine/modules/tools/signalSubscribeToolBuild.spec.js +1 -5
  165. package/dist/engine/modules/tools/signalSubscribeToolBuild.spec.js.map +1 -1
  166. package/dist/engine/modules/tools/signalUnsubscribeToolBuild.spec.js +1 -5
  167. package/dist/engine/modules/tools/signalUnsubscribeToolBuild.spec.js.map +1 -1
  168. package/dist/engine/modules/tools/skillToolBuild.js +3 -3
  169. package/dist/engine/modules/tools/skillToolBuild.js.map +1 -1
  170. package/dist/engine/modules/tools/skillToolBuild.spec.js +12 -9
  171. package/dist/engine/modules/tools/skillToolBuild.spec.js.map +1 -1
  172. package/dist/engine/modules/tools/subuserConfigureToolBuild.spec.js +1 -2
  173. package/dist/engine/modules/tools/subuserConfigureToolBuild.spec.js.map +1 -1
  174. package/dist/engine/modules/tools/subuserCreateToolBuild.spec.js +1 -2
  175. package/dist/engine/modules/tools/subuserCreateToolBuild.spec.js.map +1 -1
  176. package/dist/engine/modules/tools/subuserListToolBuild.spec.js +1 -2
  177. package/dist/engine/modules/tools/subuserListToolBuild.spec.js.map +1 -1
  178. package/dist/engine/modules/tools/topologyToolBuild.d.ts.map +1 -1
  179. package/dist/engine/modules/tools/topologyToolBuild.js +111 -2
  180. package/dist/engine/modules/tools/topologyToolBuild.js.map +1 -1
  181. package/dist/engine/modules/tools/topologyToolBuild.spec.js +99 -2
  182. package/dist/engine/modules/tools/topologyToolBuild.spec.js.map +1 -1
  183. package/dist/engine/modules/tools/types.d.ts +3 -4
  184. package/dist/engine/modules/tools/types.d.ts.map +1 -1
  185. package/dist/plugins/dashboard/site/404.html +1 -1
  186. package/dist/plugins/dashboard/site/agent.html +1 -1
  187. package/dist/plugins/dashboard/site/agent.txt +1 -1
  188. package/dist/plugins/dashboard/site/agents.html +1 -1
  189. package/dist/plugins/dashboard/site/agents.txt +1 -1
  190. package/dist/plugins/dashboard/site/automations.html +1 -1
  191. package/dist/plugins/dashboard/site/automations.txt +1 -1
  192. package/dist/plugins/dashboard/site/connectors.html +1 -1
  193. package/dist/plugins/dashboard/site/connectors.txt +1 -1
  194. package/dist/plugins/dashboard/site/index.html +1 -1
  195. package/dist/plugins/dashboard/site/index.txt +1 -1
  196. package/dist/plugins/dashboard/site/memory.html +1 -1
  197. package/dist/plugins/dashboard/site/memory.txt +1 -1
  198. package/dist/plugins/dashboard/site/processes.html +1 -1
  199. package/dist/plugins/dashboard/site/processes.txt +1 -1
  200. package/dist/plugins/dashboard/site/providers.html +1 -1
  201. package/dist/plugins/dashboard/site/providers.txt +1 -1
  202. package/dist/plugins/dashboard/site/signals.html +1 -1
  203. package/dist/plugins/dashboard/site/signals.txt +1 -1
  204. package/dist/plugins/dashboard/site/telemetry.html +1 -1
  205. package/dist/plugins/dashboard/site/telemetry.txt +1 -1
  206. package/dist/plugins/dashboard/site/tools.html +1 -1
  207. package/dist/plugins/dashboard/site/tools.txt +1 -1
  208. package/dist/plugins/database/__tests__/plugin.spec.js +4 -2
  209. package/dist/plugins/database/__tests__/plugin.spec.js.map +1 -1
  210. package/dist/plugins/monty-python/tool.spec.js +1 -2
  211. package/dist/plugins/monty-python/tool.spec.js.map +1 -1
  212. package/dist/plugins/shell/processTools.js +1 -1
  213. package/dist/plugins/shell/processTools.js.map +1 -1
  214. package/dist/plugins/shell/processTools.spec.js +2 -3
  215. package/dist/plugins/shell/processTools.spec.js.map +1 -1
  216. package/dist/plugins/shell/tool.d.ts.map +1 -1
  217. package/dist/plugins/shell/tool.js +90 -486
  218. package/dist/plugins/shell/tool.js.map +1 -1
  219. package/dist/plugins/shell/tool.spec.js +11 -20
  220. package/dist/plugins/shell/tool.spec.js.map +1 -1
  221. package/dist/prompts/SYSTEM_ENVIRONMENT.md +6 -0
  222. package/dist/prompts/SYSTEM_MEMORY.md +4 -4
  223. package/dist/prompts/SYSTEM_PERMISSIONS.md +3 -19
  224. package/dist/sandbox/docker/dockerContainerEnsure.d.ts +8 -0
  225. package/dist/sandbox/docker/dockerContainerEnsure.d.ts.map +1 -0
  226. package/dist/sandbox/docker/dockerContainerEnsure.js +56 -0
  227. package/dist/sandbox/docker/dockerContainerEnsure.js.map +1 -0
  228. package/dist/sandbox/docker/dockerContainerEnsure.spec.d.ts +2 -0
  229. package/dist/sandbox/docker/dockerContainerEnsure.spec.d.ts.map +1 -0
  230. package/dist/sandbox/docker/dockerContainerEnsure.spec.js +66 -0
  231. package/dist/sandbox/docker/dockerContainerEnsure.spec.js.map +1 -0
  232. package/dist/sandbox/docker/dockerContainerExec.d.ts +8 -0
  233. package/dist/sandbox/docker/dockerContainerExec.d.ts.map +1 -0
  234. package/dist/sandbox/docker/dockerContainerExec.js +109 -0
  235. package/dist/sandbox/docker/dockerContainerExec.js.map +1 -0
  236. package/dist/sandbox/docker/dockerContainerExec.spec.d.ts +2 -0
  237. package/dist/sandbox/docker/dockerContainerExec.spec.d.ts.map +1 -0
  238. package/dist/sandbox/docker/dockerContainerExec.spec.js +75 -0
  239. package/dist/sandbox/docker/dockerContainerExec.spec.js.map +1 -0
  240. package/dist/sandbox/docker/dockerContainerNameBuild.d.ts +6 -0
  241. package/dist/sandbox/docker/dockerContainerNameBuild.d.ts.map +1 -0
  242. package/dist/sandbox/docker/dockerContainerNameBuild.js +15 -0
  243. package/dist/sandbox/docker/dockerContainerNameBuild.js.map +1 -0
  244. package/dist/sandbox/docker/dockerContainerNameBuild.spec.d.ts +2 -0
  245. package/dist/sandbox/docker/dockerContainerNameBuild.spec.d.ts.map +1 -0
  246. package/dist/sandbox/docker/dockerContainerNameBuild.spec.js +17 -0
  247. package/dist/sandbox/docker/dockerContainerNameBuild.spec.js.map +1 -0
  248. package/dist/sandbox/docker/dockerContainers.d.ts +13 -0
  249. package/dist/sandbox/docker/dockerContainers.d.ts.map +1 -0
  250. package/dist/sandbox/docker/dockerContainers.js +42 -0
  251. package/dist/sandbox/docker/dockerContainers.js.map +1 -0
  252. package/dist/sandbox/docker/dockerContainersShared.d.ts +3 -0
  253. package/dist/sandbox/docker/dockerContainersShared.d.ts.map +1 -0
  254. package/dist/sandbox/docker/dockerContainersShared.js +3 -0
  255. package/dist/sandbox/docker/dockerContainersShared.js.map +1 -0
  256. package/dist/sandbox/docker/dockerRunInSandbox.d.ts +19 -0
  257. package/dist/sandbox/docker/dockerRunInSandbox.d.ts.map +1 -0
  258. package/dist/sandbox/docker/dockerRunInSandbox.integration.spec.d.ts +2 -0
  259. package/dist/sandbox/docker/dockerRunInSandbox.integration.spec.d.ts.map +1 -0
  260. package/dist/sandbox/docker/dockerRunInSandbox.integration.spec.js +143 -0
  261. package/dist/sandbox/docker/dockerRunInSandbox.integration.spec.js.map +1 -0
  262. package/dist/sandbox/docker/dockerRunInSandbox.js +117 -0
  263. package/dist/sandbox/docker/dockerRunInSandbox.js.map +1 -0
  264. package/dist/sandbox/docker/dockerRunInSandbox.spec.d.ts +2 -0
  265. package/dist/sandbox/docker/dockerRunInSandbox.spec.d.ts.map +1 -0
  266. package/dist/sandbox/docker/dockerRunInSandbox.spec.js +127 -0
  267. package/dist/sandbox/docker/dockerRunInSandbox.spec.js.map +1 -0
  268. package/dist/sandbox/docker/dockerTypes.d.ts +23 -0
  269. package/dist/sandbox/docker/dockerTypes.d.ts.map +1 -0
  270. package/dist/sandbox/docker/dockerTypes.js +2 -0
  271. package/dist/sandbox/docker/dockerTypes.js.map +1 -0
  272. package/dist/sandbox/sandbox.d.ts +28 -0
  273. package/dist/sandbox/sandbox.d.ts.map +1 -0
  274. package/dist/sandbox/sandbox.js +499 -0
  275. package/dist/sandbox/sandbox.js.map +1 -0
  276. package/dist/sandbox/sandbox.spec.d.ts +2 -0
  277. package/dist/sandbox/sandbox.spec.d.ts.map +1 -0
  278. package/dist/sandbox/sandbox.spec.js +167 -0
  279. package/dist/sandbox/sandbox.spec.js.map +1 -0
  280. package/dist/sandbox/sandboxCanRead.d.ts.map +1 -1
  281. package/dist/sandbox/sandboxCanRead.js +6 -6
  282. package/dist/sandbox/sandboxCanRead.js.map +1 -1
  283. package/dist/sandbox/sandboxCanRead.spec.js +15 -7
  284. package/dist/sandbox/sandboxCanRead.spec.js.map +1 -1
  285. package/dist/sandbox/sandboxCanWrite.d.ts.map +1 -1
  286. package/dist/sandbox/sandboxCanWrite.js +25 -0
  287. package/dist/sandbox/sandboxCanWrite.js.map +1 -1
  288. package/dist/sandbox/sandboxCanWrite.spec.js +6 -1
  289. package/dist/sandbox/sandboxCanWrite.spec.js.map +1 -1
  290. package/dist/sandbox/sandboxDocker.spec.d.ts +2 -0
  291. package/dist/sandbox/sandboxDocker.spec.d.ts.map +1 -0
  292. package/dist/sandbox/sandboxDocker.spec.js +121 -0
  293. package/dist/sandbox/sandboxDocker.spec.js.map +1 -0
  294. package/dist/sandbox/sandboxFilesystemPolicyBuild.d.ts +1 -1
  295. package/dist/sandbox/sandboxFilesystemPolicyBuild.d.ts.map +1 -1
  296. package/dist/sandbox/sandboxFilesystemPolicyBuild.js +14 -6
  297. package/dist/sandbox/sandboxFilesystemPolicyBuild.js.map +1 -1
  298. package/dist/sandbox/sandboxFilesystemPolicyBuild.spec.js +7 -2
  299. package/dist/sandbox/sandboxFilesystemPolicyBuild.spec.js.map +1 -1
  300. package/dist/sandbox/sandboxPathContainerToHost.d.ts +6 -0
  301. package/dist/sandbox/sandboxPathContainerToHost.d.ts.map +1 -0
  302. package/dist/sandbox/sandboxPathContainerToHost.js +24 -0
  303. package/dist/sandbox/sandboxPathContainerToHost.js.map +1 -0
  304. package/dist/sandbox/sandboxPathContainerToHost.spec.d.ts +2 -0
  305. package/dist/sandbox/sandboxPathContainerToHost.spec.d.ts.map +1 -0
  306. package/dist/sandbox/sandboxPathContainerToHost.spec.js +25 -0
  307. package/dist/sandbox/sandboxPathContainerToHost.spec.js.map +1 -0
  308. package/dist/sandbox/sandboxPathHostToContainer.d.ts +6 -0
  309. package/dist/sandbox/sandboxPathHostToContainer.d.ts.map +1 -0
  310. package/dist/sandbox/sandboxPathHostToContainer.js +23 -0
  311. package/dist/sandbox/sandboxPathHostToContainer.js.map +1 -0
  312. package/dist/sandbox/sandboxPathHostToContainer.spec.d.ts +2 -0
  313. package/dist/sandbox/sandboxPathHostToContainer.spec.d.ts.map +1 -0
  314. package/dist/sandbox/sandboxPathHostToContainer.spec.js +32 -0
  315. package/dist/sandbox/sandboxPathHostToContainer.spec.js.map +1 -0
  316. package/dist/sandbox/sandboxReadBoundaryDenyPathsBuild.d.ts +11 -0
  317. package/dist/sandbox/sandboxReadBoundaryDenyPathsBuild.d.ts.map +1 -0
  318. package/dist/sandbox/sandboxReadBoundaryDenyPathsBuild.js +20 -0
  319. package/dist/sandbox/sandboxReadBoundaryDenyPathsBuild.js.map +1 -0
  320. package/dist/sandbox/sandboxReadBoundaryDenyPathsBuild.spec.d.ts +2 -0
  321. package/dist/sandbox/sandboxReadBoundaryDenyPathsBuild.spec.d.ts.map +1 -0
  322. package/dist/sandbox/sandboxReadBoundaryDenyPathsBuild.spec.js +20 -0
  323. package/dist/sandbox/sandboxReadBoundaryDenyPathsBuild.spec.js.map +1 -0
  324. package/dist/sandbox/sandboxReadDenyPathsBuild.d.ts +13 -0
  325. package/dist/sandbox/sandboxReadDenyPathsBuild.d.ts.map +1 -0
  326. package/dist/sandbox/sandboxReadDenyPathsBuild.js +28 -0
  327. package/dist/sandbox/sandboxReadDenyPathsBuild.js.map +1 -0
  328. package/dist/sandbox/sandboxReadDenyPathsBuild.spec.d.ts +2 -0
  329. package/dist/sandbox/sandboxReadDenyPathsBuild.spec.d.ts.map +1 -0
  330. package/dist/sandbox/sandboxReadDenyPathsBuild.spec.js +29 -0
  331. package/dist/sandbox/sandboxReadDenyPathsBuild.spec.js.map +1 -0
  332. package/dist/sandbox/sandboxTypes.d.ts +76 -0
  333. package/dist/sandbox/sandboxTypes.d.ts.map +1 -0
  334. package/dist/sandbox/sandboxTypes.js +2 -0
  335. package/dist/sandbox/sandboxTypes.js.map +1 -0
  336. package/dist/settings.d.ts +17 -1
  337. package/dist/settings.d.ts.map +1 -1
  338. package/dist/settings.js.map +1 -1
  339. package/dist/skills/daycare-friendship/SKILL.md +295 -0
  340. package/dist/skills/skills/daycare-friendship/SKILL.md +295 -0
  341. package/dist/storage/agentsRepository.d.ts +1 -0
  342. package/dist/storage/agentsRepository.d.ts.map +1 -1
  343. package/dist/storage/agentsRepository.js +16 -0
  344. package/dist/storage/agentsRepository.js.map +1 -1
  345. package/dist/storage/agentsRepository.spec.js +45 -0
  346. package/dist/storage/agentsRepository.spec.js.map +1 -1
  347. package/dist/storage/connectionsRepository.d.ts +18 -0
  348. package/dist/storage/connectionsRepository.d.ts.map +1 -0
  349. package/dist/storage/connectionsRepository.js +163 -0
  350. package/dist/storage/connectionsRepository.js.map +1 -0
  351. package/dist/storage/connectionsRepository.spec.d.ts +2 -0
  352. package/dist/storage/connectionsRepository.spec.d.ts.map +1 -0
  353. package/dist/storage/connectionsRepository.spec.js +115 -0
  354. package/dist/storage/connectionsRepository.spec.js.map +1 -0
  355. package/dist/storage/databaseTypes.d.ts +19 -0
  356. package/dist/storage/databaseTypes.d.ts.map +1 -1
  357. package/dist/storage/migrations/20260222_add_usertag_connections.d.ts +7 -0
  358. package/dist/storage/migrations/20260222_add_usertag_connections.d.ts.map +1 -0
  359. package/dist/storage/migrations/20260222_add_usertag_connections.js +32 -0
  360. package/dist/storage/migrations/20260222_add_usertag_connections.js.map +1 -0
  361. package/dist/storage/migrations/20260222_add_usertag_connections.spec.d.ts +2 -0
  362. package/dist/storage/migrations/20260222_add_usertag_connections.spec.d.ts.map +1 -0
  363. package/dist/storage/migrations/20260222_add_usertag_connections.spec.js +55 -0
  364. package/dist/storage/migrations/20260222_add_usertag_connections.spec.js.map +1 -0
  365. package/dist/storage/migrations/20260225_require_usertag.d.ts +7 -0
  366. package/dist/storage/migrations/20260225_require_usertag.d.ts.map +1 -0
  367. package/dist/storage/migrations/20260225_require_usertag.js +60 -0
  368. package/dist/storage/migrations/20260225_require_usertag.js.map +1 -0
  369. package/dist/storage/migrations/20260225_require_usertag.spec.d.ts +2 -0
  370. package/dist/storage/migrations/20260225_require_usertag.spec.d.ts.map +1 -0
  371. package/dist/storage/migrations/20260225_require_usertag.spec.js +70 -0
  372. package/dist/storage/migrations/20260225_require_usertag.spec.js.map +1 -0
  373. package/dist/storage/migrations/20260226_rename_usertag_to_nametag.d.ts +7 -0
  374. package/dist/storage/migrations/20260226_rename_usertag_to_nametag.d.ts.map +1 -0
  375. package/dist/storage/migrations/20260226_rename_usertag_to_nametag.js +47 -0
  376. package/dist/storage/migrations/20260226_rename_usertag_to_nametag.js.map +1 -0
  377. package/dist/storage/migrations/20260226_rename_usertag_to_nametag.spec.d.ts +2 -0
  378. package/dist/storage/migrations/20260226_rename_usertag_to_nametag.spec.d.ts.map +1 -0
  379. package/dist/storage/migrations/20260226_rename_usertag_to_nametag.spec.js +59 -0
  380. package/dist/storage/migrations/20260226_rename_usertag_to_nametag.spec.js.map +1 -0
  381. package/dist/storage/migrations/_migrations.d.ts.map +1 -1
  382. package/dist/storage/migrations/_migrations.js +7 -1
  383. package/dist/storage/migrations/_migrations.js.map +1 -1
  384. package/dist/storage/storage.d.ts +3 -0
  385. package/dist/storage/storage.d.ts.map +1 -1
  386. package/dist/storage/storage.js +35 -3
  387. package/dist/storage/storage.js.map +1 -1
  388. package/dist/storage/storage.spec.js +1 -0
  389. package/dist/storage/storage.spec.js.map +1 -1
  390. package/dist/storage/usersRepository.d.ts +2 -0
  391. package/dist/storage/usersRepository.d.ts.map +1 -1
  392. package/dist/storage/usersRepository.js +63 -3
  393. package/dist/storage/usersRepository.js.map +1 -1
  394. package/dist/storage/usersRepository.spec.js +9 -2
  395. package/dist/storage/usersRepository.spec.js.map +1 -1
  396. package/dist/types.d.ts +2 -0
  397. package/dist/types.d.ts.map +1 -1
  398. package/dist/types.js +2 -0
  399. package/dist/types.js.map +1 -1
  400. package/package.json +6 -3
  401. /package/dist/plugins/dashboard/site/_next/static/{X_oqQhoSTmj1_qmNPx-r5 → fEfvfa55gmpjx9cT66rjx}/_buildManifest.js +0 -0
  402. /package/dist/plugins/dashboard/site/_next/static/{X_oqQhoSTmj1_qmNPx-r5 → fEfvfa55gmpjx9cT66rjx}/_ssgManifest.js +0 -0
@@ -0,0 +1,295 @@
1
+ ---
2
+ name: daycare-friendship
3
+ description: Friendship mechanics for daycare agents. Use when the user wants to add friends, manage friend requests, send messages to friends, share or unshare subusers with friends, or understand what nametags are.
4
+ ---
5
+
6
+ # Friendship
7
+
8
+ Daycare lets users connect as friends and share subusers across boundaries. This skill covers nametags, the friendship lifecycle, messaging, and subuser sharing.
9
+
10
+ ## What is a Nametag
11
+
12
+ Every user (and subuser) in Daycare has a **nametag** — a unique, human-readable identifier. Nametags are how users refer to each other in all friend operations.
13
+
14
+ **Format:** A lowercase string generated from dictionary words plus random digits with no separator, e.g. `swiftfox42`, `happypenguin7`, `lazydog55`.
15
+
16
+ **Key properties:**
17
+ - Required for every user — assigned automatically at creation
18
+ - Globally unique across the entire Daycare instance
19
+ - Case-insensitive when looking up (always normalized to lowercase)
20
+ - Immutable once assigned — nametags do not change
21
+ - Used instead of raw user IDs in all user-facing interactions
22
+
23
+ **How to find a nametag:** Run `topology` — your own nametag appears at the top. Friends and their nametags appear in the Friends section.
24
+
25
+ ## Why Friends
26
+
27
+ Friendship serves two purposes:
28
+
29
+ 1. **Direct messaging** — Friends can send messages to each other across user boundaries. Without friendship, users are completely isolated.
30
+ 2. **Subuser sharing** — Owners can share their subusers (isolated applications) with friends, enabling collaboration. A friend who accepts a shared subuser can message it directly.
31
+
32
+ Friendship is mutual — both sides must agree. This prevents spam and unwanted access.
33
+
34
+ ## Friendship Lifecycle
35
+
36
+ ### States
37
+
38
+ A relationship between two users progresses through these states:
39
+
40
+ | State | Meaning |
41
+ |-------|---------|
42
+ | None | No relationship exists |
43
+ | PendingOut | You sent a request, waiting for them to accept |
44
+ | PendingIn | They sent you a request, waiting for you to accept |
45
+ | Friends | Both sides accepted — full access to messaging and sharing |
46
+
47
+ ### Flow
48
+
49
+ **Adding a friend:**
50
+
51
+ 1. You call `friend_add("their-nametag")` — state moves to **PendingOut**
52
+ 2. They receive a system message notifying them of your request
53
+ 3. They call `friend_add("your-nametag")` — state moves to **Friends**
54
+ 4. You receive a system message confirming the friendship
55
+
56
+ **Rejecting or canceling:**
57
+
58
+ - If you have a pending incoming request: `friend_remove("their-nametag")` rejects it (state returns to None)
59
+ - If you sent a pending outgoing request: `friend_remove("their-nametag")` cancels it (state returns to None)
60
+
61
+ **Unfriending:**
62
+
63
+ - Either side calls `friend_remove("their-nametag")` — the friendship ends
64
+ - All subuser shares between the two users are automatically cleaned up
65
+ - The other side receives a notification
66
+
67
+ ### Cooldown
68
+
69
+ After removing a friend or having a request rejected, there is a **7-day cooldown** before you can send a new request to the same user.
70
+
71
+ ## Friend Tools
72
+
73
+ ### `friend_add`
74
+
75
+ Send or accept a friend request by nametag.
76
+
77
+ **Parameters:**
78
+ - `nametag` (string) — the target user's nametag
79
+
80
+ **Behavior:**
81
+ - If no relationship exists: creates a pending outgoing request
82
+ - If they already sent you a request: accepts it and you become friends
83
+ - If you are already friends: returns current status (no-op)
84
+ - If a pending subuser share offer exists from a friend: accepts the share
85
+
86
+ **Example:**
87
+ ```
88
+ friend_add({ nametag: "swiftfox42" })
89
+ // → { summary: "Friend request sent to swiftfox42", status: "pending_out", nametag: "swiftfox42" }
90
+ ```
91
+
92
+ ### `friend_remove`
93
+
94
+ Unfriend, reject a request, or cancel a pending request by nametag.
95
+
96
+ **Parameters:**
97
+ - `nametag` (string) — the target user's nametag
98
+
99
+ **Behavior:**
100
+ - If friends: unfriends and cleans up all subuser shares between you
101
+ - If pending incoming: rejects the request
102
+ - If pending outgoing: cancels the request
103
+ - If a shared subuser: removes the share from your side
104
+
105
+ **Example:**
106
+ ```
107
+ friend_remove({ nametag: "swiftfox42" })
108
+ // → { summary: "Removed swiftfox42 as friend", status: "removed", nametag: "swiftfox42" }
109
+ ```
110
+
111
+ ### `friend_send`
112
+
113
+ Send a direct message to a friend by nametag.
114
+
115
+ **Parameters:**
116
+ - `nametag` (string) — the friend's nametag (or a shared subuser's nametag)
117
+ - `message` (string) — the message text to send
118
+
119
+ **Requirements:**
120
+ - You must be mutual friends (both sides accepted)
121
+ - For shared subusers: the share must be active (both sides accepted)
122
+
123
+ **Behavior:**
124
+ - Delivers the message as a system message to the friend's agents
125
+ - When messaging a shared subuser, delivers to that subuser's gateway agent
126
+
127
+ **Example:**
128
+ ```
129
+ friend_send({ nametag: "swiftfox42", message: "Hey, can you check the latest deploy?" })
130
+ // → { summary: "Message sent to swiftfox42", nametag: "swiftfox42" }
131
+ ```
132
+
133
+ ### `friend_share_subuser`
134
+
135
+ Share one of your subusers with a friend. Only the owner of the subuser can call this.
136
+
137
+ **Parameters:**
138
+ - `friendNametag` (string) — the friend's nametag
139
+ - `subuserId` (string) — the ID of the subuser to share
140
+
141
+ **Requirements:**
142
+ - You must own the subuser
143
+ - You must be mutual friends with the target
144
+
145
+ **Behavior:**
146
+ - Creates a pending share offer (subuser side requested, friend side pending)
147
+ - The friend receives a notification with the subuser's nametag
148
+ - The friend must call `friend_add("<subuser-nametag>")` to accept the share
149
+
150
+ **Example:**
151
+ ```
152
+ friend_share_subuser({ friendNametag: "swiftfox42", subuserId: "sub_abc123" })
153
+ // → { summary: "Shared subuser with swiftfox42 (pending acceptance)", status: "pending", ... }
154
+ ```
155
+
156
+ ### `friend_unshare_subuser`
157
+
158
+ Revoke a subuser share from a friend. Only the owner of the subuser can call this.
159
+
160
+ **Parameters:**
161
+ - `friendNametag` (string) — the friend's nametag
162
+ - `subuserId` (string) — the ID of the subuser to unshare
163
+
164
+ **Behavior:**
165
+ - Removes the share regardless of whether it was pending or active
166
+ - The friend receives a notification that access was revoked
167
+ - The friend can no longer message the subuser
168
+
169
+ **Example:**
170
+ ```
171
+ friend_unshare_subuser({ friendNametag: "swiftfox42", subuserId: "sub_abc123" })
172
+ // → { summary: "Revoked subuser share from swiftfox42", status: "removed", ... }
173
+ ```
174
+
175
+ ## Subuser Sharing
176
+
177
+ Subuser sharing lets an owner grant a friend access to one of their isolated subusers. This enables cross-user collaboration through the subuser's gateway agent.
178
+
179
+ ### What is a Subuser
180
+
181
+ A subuser is an isolated application created by the owner. It has its own memory, filesystem, and agent scope. Each subuser has a **gateway agent** — the single entry point for receiving messages.
182
+
183
+ ### Share Lifecycle
184
+
185
+ 1. **Owner initiates:** `friend_share_subuser("swiftfox42", subuserId)` — creates a pending share
186
+ 2. **Friend sees notification:** a system message with the subuser's nametag and description
187
+ 3. **Friend accepts:** `friend_add("<subuser-nametag>")` — share becomes active
188
+ 4. **Friend can now message:** `friend_send("<subuser-nametag>", "hello")` — delivers to gateway agent
189
+ 5. **Revocation (either side):**
190
+ - Owner: `friend_unshare_subuser("swiftfox42", subuserId)` — revokes access
191
+ - Friend: `friend_remove("<subuser-nametag>")` — removes from their side
192
+
193
+ ### Share States
194
+
195
+ | State | Meaning |
196
+ |-------|---------|
197
+ | Pending | Owner shared, friend hasn't accepted yet |
198
+ | Active | Both sides confirmed — friend can message the subuser |
199
+
200
+ ### Automatic Cleanup
201
+
202
+ When two users unfriend each other (via `friend_remove`), **all subuser shares between them are automatically deleted**. No manual cleanup is needed.
203
+
204
+ ## Inspecting Friends
205
+
206
+ Use `topology` (no parameters) to see your current friend connections and shared subusers.
207
+
208
+ **Friends section format:**
209
+
210
+ ```
211
+ ## Friends (2)
212
+ swiftfox42
213
+ -> shared out: helper (nametag=coolcat11) gateway=gw-abc status=active
214
+ -> shared out: assistant (nametag=lazydog55) gateway=gw-def status=pending
215
+ <- shared in: bob-helper (nametag=smartowl22) gateway=gw-ghi status=active
216
+
217
+ happypenguin7
218
+ (no shared subusers)
219
+ ```
220
+
221
+ **Reading the topology:**
222
+ - `-> shared out` = your subuser shared to that friend
223
+ - `<- shared in` = their subuser shared to you
224
+ - `status=active` = both sides accepted, messaging works
225
+ - `status=pending` = waiting for acceptance
226
+ - The gateway ID is useful for `send_agent_message` if needed
227
+
228
+ **Note:** Subuser agents cannot see the Friends section. Only non-subuser (owner) agents see friend information in topology.
229
+
230
+ ## Common Scenarios
231
+
232
+ ### Adding a Friend
233
+
234
+ User A wants to connect with User B:
235
+
236
+ ```
237
+ // User A:
238
+ friend_add({ nametag: "userbtag123" })
239
+ // Status: pending_out — User B gets notified
240
+
241
+ // User B (after receiving notification):
242
+ friend_add({ nametag: "useratag456" })
243
+ // Status: friends — both sides confirmed
244
+ ```
245
+
246
+ ### Sharing a Subuser with a Friend
247
+
248
+ Owner wants to give a friend access to their "research-assistant" subuser:
249
+
250
+ ```
251
+ // Step 1: Owner shares
252
+ friend_share_subuser({ friendNametag: "swiftfox42", subuserId: "sub_research" })
253
+ // Friend gets notified with the subuser's nametag (e.g. "smartowl22")
254
+
255
+ // Step 2: Friend accepts
256
+ friend_add({ nametag: "smartowl22" })
257
+ // Share is now active
258
+
259
+ // Step 3: Friend messages the subuser
260
+ friend_send({ nametag: "smartowl22", message: "Summarize recent findings" })
261
+ // Message delivered to the research-assistant gateway agent
262
+ ```
263
+
264
+ ### Checking Who Your Friends Are
265
+
266
+ ```
267
+ topology()
268
+ // Look at the "## Friends" section for the full list
269
+ ```
270
+
271
+ ### Cleaning Up a Friendship
272
+
273
+ ```
274
+ // Unfriend — also removes all shared subusers between you
275
+ friend_remove({ nametag: "swiftfox42" })
276
+ ```
277
+
278
+ ### Revoking a Single Subuser Share
279
+
280
+ ```
281
+ // Owner revokes without unfriending
282
+ friend_unshare_subuser({ friendNametag: "swiftfox42", subuserId: "sub_helper" })
283
+ ```
284
+
285
+ ## Important Rules
286
+
287
+ 1. **Friendship is mutual.** Both sides must call `friend_add` before messaging or sharing works.
288
+ 2. **Messaging requires friendship.** `friend_send` fails if you are not mutual friends (or if a subuser share is not active).
289
+ 3. **Only owners can share subusers.** You cannot share a subuser you do not own.
290
+ 4. **Only owners can revoke shares.** Use `friend_unshare_subuser`. Friends can remove from their side with `friend_remove`.
291
+ 5. **Unfriending cleans up everything.** All subuser shares between the two users are deleted automatically.
292
+ 6. **Cooldown after removal.** You must wait 7 days before re-requesting someone you removed or who rejected you.
293
+ 7. **Nametags are case-insensitive.** `SwiftFox42` and `swiftfox42` resolve to the same user.
294
+ 8. **Subuser agents cannot manage friends.** Only owner (non-subuser) agents have access to friend tools and see the Friends section in topology.
295
+ 9. **Use topology to discover nametags.** Do not guess nametags — always check topology or ask the user.
@@ -0,0 +1,295 @@
1
+ ---
2
+ name: daycare-friendship
3
+ description: Friendship mechanics for daycare agents. Use when the user wants to add friends, manage friend requests, send messages to friends, share or unshare subusers with friends, or understand what nametags are.
4
+ ---
5
+
6
+ # Friendship
7
+
8
+ Daycare lets users connect as friends and share subusers across boundaries. This skill covers nametags, the friendship lifecycle, messaging, and subuser sharing.
9
+
10
+ ## What is a Nametag
11
+
12
+ Every user (and subuser) in Daycare has a **nametag** — a unique, human-readable identifier. Nametags are how users refer to each other in all friend operations.
13
+
14
+ **Format:** A lowercase string generated from dictionary words plus random digits with no separator, e.g. `swiftfox42`, `happypenguin7`, `lazydog55`.
15
+
16
+ **Key properties:**
17
+ - Required for every user — assigned automatically at creation
18
+ - Globally unique across the entire Daycare instance
19
+ - Case-insensitive when looking up (always normalized to lowercase)
20
+ - Immutable once assigned — nametags do not change
21
+ - Used instead of raw user IDs in all user-facing interactions
22
+
23
+ **How to find a nametag:** Run `topology` — your own nametag appears at the top. Friends and their nametags appear in the Friends section.
24
+
25
+ ## Why Friends
26
+
27
+ Friendship serves two purposes:
28
+
29
+ 1. **Direct messaging** — Friends can send messages to each other across user boundaries. Without friendship, users are completely isolated.
30
+ 2. **Subuser sharing** — Owners can share their subusers (isolated applications) with friends, enabling collaboration. A friend who accepts a shared subuser can message it directly.
31
+
32
+ Friendship is mutual — both sides must agree. This prevents spam and unwanted access.
33
+
34
+ ## Friendship Lifecycle
35
+
36
+ ### States
37
+
38
+ A relationship between two users progresses through these states:
39
+
40
+ | State | Meaning |
41
+ |-------|---------|
42
+ | None | No relationship exists |
43
+ | PendingOut | You sent a request, waiting for them to accept |
44
+ | PendingIn | They sent you a request, waiting for you to accept |
45
+ | Friends | Both sides accepted — full access to messaging and sharing |
46
+
47
+ ### Flow
48
+
49
+ **Adding a friend:**
50
+
51
+ 1. You call `friend_add("their-nametag")` — state moves to **PendingOut**
52
+ 2. They receive a system message notifying them of your request
53
+ 3. They call `friend_add("your-nametag")` — state moves to **Friends**
54
+ 4. You receive a system message confirming the friendship
55
+
56
+ **Rejecting or canceling:**
57
+
58
+ - If you have a pending incoming request: `friend_remove("their-nametag")` rejects it (state returns to None)
59
+ - If you sent a pending outgoing request: `friend_remove("their-nametag")` cancels it (state returns to None)
60
+
61
+ **Unfriending:**
62
+
63
+ - Either side calls `friend_remove("their-nametag")` — the friendship ends
64
+ - All subuser shares between the two users are automatically cleaned up
65
+ - The other side receives a notification
66
+
67
+ ### Cooldown
68
+
69
+ After removing a friend or having a request rejected, there is a **7-day cooldown** before you can send a new request to the same user.
70
+
71
+ ## Friend Tools
72
+
73
+ ### `friend_add`
74
+
75
+ Send or accept a friend request by nametag.
76
+
77
+ **Parameters:**
78
+ - `nametag` (string) — the target user's nametag
79
+
80
+ **Behavior:**
81
+ - If no relationship exists: creates a pending outgoing request
82
+ - If they already sent you a request: accepts it and you become friends
83
+ - If you are already friends: returns current status (no-op)
84
+ - If a pending subuser share offer exists from a friend: accepts the share
85
+
86
+ **Example:**
87
+ ```
88
+ friend_add({ nametag: "swiftfox42" })
89
+ // → { summary: "Friend request sent to swiftfox42", status: "pending_out", nametag: "swiftfox42" }
90
+ ```
91
+
92
+ ### `friend_remove`
93
+
94
+ Unfriend, reject a request, or cancel a pending request by nametag.
95
+
96
+ **Parameters:**
97
+ - `nametag` (string) — the target user's nametag
98
+
99
+ **Behavior:**
100
+ - If friends: unfriends and cleans up all subuser shares between you
101
+ - If pending incoming: rejects the request
102
+ - If pending outgoing: cancels the request
103
+ - If a shared subuser: removes the share from your side
104
+
105
+ **Example:**
106
+ ```
107
+ friend_remove({ nametag: "swiftfox42" })
108
+ // → { summary: "Removed swiftfox42 as friend", status: "removed", nametag: "swiftfox42" }
109
+ ```
110
+
111
+ ### `friend_send`
112
+
113
+ Send a direct message to a friend by nametag.
114
+
115
+ **Parameters:**
116
+ - `nametag` (string) — the friend's nametag (or a shared subuser's nametag)
117
+ - `message` (string) — the message text to send
118
+
119
+ **Requirements:**
120
+ - You must be mutual friends (both sides accepted)
121
+ - For shared subusers: the share must be active (both sides accepted)
122
+
123
+ **Behavior:**
124
+ - Delivers the message as a system message to the friend's agents
125
+ - When messaging a shared subuser, delivers to that subuser's gateway agent
126
+
127
+ **Example:**
128
+ ```
129
+ friend_send({ nametag: "swiftfox42", message: "Hey, can you check the latest deploy?" })
130
+ // → { summary: "Message sent to swiftfox42", nametag: "swiftfox42" }
131
+ ```
132
+
133
+ ### `friend_share_subuser`
134
+
135
+ Share one of your subusers with a friend. Only the owner of the subuser can call this.
136
+
137
+ **Parameters:**
138
+ - `friendNametag` (string) — the friend's nametag
139
+ - `subuserId` (string) — the ID of the subuser to share
140
+
141
+ **Requirements:**
142
+ - You must own the subuser
143
+ - You must be mutual friends with the target
144
+
145
+ **Behavior:**
146
+ - Creates a pending share offer (subuser side requested, friend side pending)
147
+ - The friend receives a notification with the subuser's nametag
148
+ - The friend must call `friend_add("<subuser-nametag>")` to accept the share
149
+
150
+ **Example:**
151
+ ```
152
+ friend_share_subuser({ friendNametag: "swiftfox42", subuserId: "sub_abc123" })
153
+ // → { summary: "Shared subuser with swiftfox42 (pending acceptance)", status: "pending", ... }
154
+ ```
155
+
156
+ ### `friend_unshare_subuser`
157
+
158
+ Revoke a subuser share from a friend. Only the owner of the subuser can call this.
159
+
160
+ **Parameters:**
161
+ - `friendNametag` (string) — the friend's nametag
162
+ - `subuserId` (string) — the ID of the subuser to unshare
163
+
164
+ **Behavior:**
165
+ - Removes the share regardless of whether it was pending or active
166
+ - The friend receives a notification that access was revoked
167
+ - The friend can no longer message the subuser
168
+
169
+ **Example:**
170
+ ```
171
+ friend_unshare_subuser({ friendNametag: "swiftfox42", subuserId: "sub_abc123" })
172
+ // → { summary: "Revoked subuser share from swiftfox42", status: "removed", ... }
173
+ ```
174
+
175
+ ## Subuser Sharing
176
+
177
+ Subuser sharing lets an owner grant a friend access to one of their isolated subusers. This enables cross-user collaboration through the subuser's gateway agent.
178
+
179
+ ### What is a Subuser
180
+
181
+ A subuser is an isolated application created by the owner. It has its own memory, filesystem, and agent scope. Each subuser has a **gateway agent** — the single entry point for receiving messages.
182
+
183
+ ### Share Lifecycle
184
+
185
+ 1. **Owner initiates:** `friend_share_subuser("swiftfox42", subuserId)` — creates a pending share
186
+ 2. **Friend sees notification:** a system message with the subuser's nametag and description
187
+ 3. **Friend accepts:** `friend_add("<subuser-nametag>")` — share becomes active
188
+ 4. **Friend can now message:** `friend_send("<subuser-nametag>", "hello")` — delivers to gateway agent
189
+ 5. **Revocation (either side):**
190
+ - Owner: `friend_unshare_subuser("swiftfox42", subuserId)` — revokes access
191
+ - Friend: `friend_remove("<subuser-nametag>")` — removes from their side
192
+
193
+ ### Share States
194
+
195
+ | State | Meaning |
196
+ |-------|---------|
197
+ | Pending | Owner shared, friend hasn't accepted yet |
198
+ | Active | Both sides confirmed — friend can message the subuser |
199
+
200
+ ### Automatic Cleanup
201
+
202
+ When two users unfriend each other (via `friend_remove`), **all subuser shares between them are automatically deleted**. No manual cleanup is needed.
203
+
204
+ ## Inspecting Friends
205
+
206
+ Use `topology` (no parameters) to see your current friend connections and shared subusers.
207
+
208
+ **Friends section format:**
209
+
210
+ ```
211
+ ## Friends (2)
212
+ swiftfox42
213
+ -> shared out: helper (nametag=coolcat11) gateway=gw-abc status=active
214
+ -> shared out: assistant (nametag=lazydog55) gateway=gw-def status=pending
215
+ <- shared in: bob-helper (nametag=smartowl22) gateway=gw-ghi status=active
216
+
217
+ happypenguin7
218
+ (no shared subusers)
219
+ ```
220
+
221
+ **Reading the topology:**
222
+ - `-> shared out` = your subuser shared to that friend
223
+ - `<- shared in` = their subuser shared to you
224
+ - `status=active` = both sides accepted, messaging works
225
+ - `status=pending` = waiting for acceptance
226
+ - The gateway ID is useful for `send_agent_message` if needed
227
+
228
+ **Note:** Subuser agents cannot see the Friends section. Only non-subuser (owner) agents see friend information in topology.
229
+
230
+ ## Common Scenarios
231
+
232
+ ### Adding a Friend
233
+
234
+ User A wants to connect with User B:
235
+
236
+ ```
237
+ // User A:
238
+ friend_add({ nametag: "userbtag123" })
239
+ // Status: pending_out — User B gets notified
240
+
241
+ // User B (after receiving notification):
242
+ friend_add({ nametag: "useratag456" })
243
+ // Status: friends — both sides confirmed
244
+ ```
245
+
246
+ ### Sharing a Subuser with a Friend
247
+
248
+ Owner wants to give a friend access to their "research-assistant" subuser:
249
+
250
+ ```
251
+ // Step 1: Owner shares
252
+ friend_share_subuser({ friendNametag: "swiftfox42", subuserId: "sub_research" })
253
+ // Friend gets notified with the subuser's nametag (e.g. "smartowl22")
254
+
255
+ // Step 2: Friend accepts
256
+ friend_add({ nametag: "smartowl22" })
257
+ // Share is now active
258
+
259
+ // Step 3: Friend messages the subuser
260
+ friend_send({ nametag: "smartowl22", message: "Summarize recent findings" })
261
+ // Message delivered to the research-assistant gateway agent
262
+ ```
263
+
264
+ ### Checking Who Your Friends Are
265
+
266
+ ```
267
+ topology()
268
+ // Look at the "## Friends" section for the full list
269
+ ```
270
+
271
+ ### Cleaning Up a Friendship
272
+
273
+ ```
274
+ // Unfriend — also removes all shared subusers between you
275
+ friend_remove({ nametag: "swiftfox42" })
276
+ ```
277
+
278
+ ### Revoking a Single Subuser Share
279
+
280
+ ```
281
+ // Owner revokes without unfriending
282
+ friend_unshare_subuser({ friendNametag: "swiftfox42", subuserId: "sub_helper" })
283
+ ```
284
+
285
+ ## Important Rules
286
+
287
+ 1. **Friendship is mutual.** Both sides must call `friend_add` before messaging or sharing works.
288
+ 2. **Messaging requires friendship.** `friend_send` fails if you are not mutual friends (or if a subuser share is not active).
289
+ 3. **Only owners can share subusers.** You cannot share a subuser you do not own.
290
+ 4. **Only owners can revoke shares.** Use `friend_unshare_subuser`. Friends can remove from their side with `friend_remove`.
291
+ 5. **Unfriending cleans up everything.** All subuser shares between the two users are deleted automatically.
292
+ 6. **Cooldown after removal.** You must wait 7 days before re-requesting someone you removed or who rejected you.
293
+ 7. **Nametags are case-insensitive.** `SwiftFox42` and `swiftfox42` resolve to the same user.
294
+ 8. **Subuser agents cannot manage friends.** Only owner (non-subuser) agents have access to friend tools and see the Friends section in topology.
295
+ 9. **Use topology to discover nametags.** Do not guess nametags — always check topology or ask the user.
@@ -14,6 +14,7 @@ export declare class AgentsRepository {
14
14
  constructor(db: DatabaseSync);
15
15
  findById(id: string): Promise<AgentDbRecord | null>;
16
16
  findMany(): Promise<AgentDbRecord[]>;
17
+ findByUserId(userId: string): Promise<AgentDbRecord[]>;
17
18
  create(record: AgentDbRecord): Promise<void>;
18
19
  update(id: string, data: Partial<AgentDbRecord>): Promise<void>;
19
20
  invalidate(id: string): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"agentsRepository.d.ts","sourceRoot":"","sources":["../../sources/storage/agentsRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AAE1E;;;GAGG;AACH,qBAAa,gBAAgB;IACzB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAe;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;IAC3D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmB;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,eAAe,CAAS;gBAEpB,EAAE,EAAE,YAAY;IAItB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA0BnD,QAAQ,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAgBpC,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAmD5C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAuD/D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3C,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;CAerB"}
1
+ {"version":3,"file":"agentsRepository.d.ts","sourceRoot":"","sources":["../../sources/storage/agentsRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AAE1E;;;GAGG;AACH,qBAAa,gBAAgB;IACzB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAe;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoC;IAC/D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;IAC3D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmB;IAC7C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C,OAAO,CAAC,eAAe,CAAS;gBAEpB,EAAE,EAAE,YAAY;IAItB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA0BnD,QAAQ,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAgBpC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAoBtD,MAAM,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAmD5C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAuD/D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3C,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;CAerB"}
@@ -50,6 +50,22 @@ export class AgentsRepository {
50
50
  });
51
51
  return parsed.map((entry) => agentClone(entry));
52
52
  }
53
+ async findByUserId(userId) {
54
+ if (this.allAgentsLoaded) {
55
+ const filtered = Array.from(this.agentsById.values()).filter((record) => record.userId === userId);
56
+ return agentsSort(filtered).map((record) => agentClone(record));
57
+ }
58
+ const rows = this.db
59
+ .prepare("SELECT * FROM agents WHERE user_id = ? ORDER BY updated_at ASC")
60
+ .all(userId);
61
+ const parsed = rows.map((row) => this.agentParse(row));
62
+ await this.cacheLock.inLock(() => {
63
+ for (const record of parsed) {
64
+ this.agentCacheSet(record);
65
+ }
66
+ });
67
+ return parsed.map((record) => agentClone(record));
68
+ }
53
69
  async create(record) {
54
70
  await this.createLock.inLock(async () => {
55
71
  this.db
@@ -1 +1 @@
1
- {"version":3,"file":"agentsRepository.js","sourceRoot":"","sources":["../../sources/storage/agentsRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IACR,EAAE,CAAe;IACjB,UAAU,GAAG,IAAI,GAAG,EAAyB,CAAC;IAC9C,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC1C,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAC5B,UAAU,GAAG,IAAI,SAAS,EAAE,CAAC;IACtC,eAAe,GAAG,KAAK,CAAC;IAEhC,YAAY,EAAgB;QACxB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU;QACrB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACvC,IAAI,MAAM,EAAE,CAAC;YACT,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;YAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;Y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