]> git.giacomolli.uk - onechat/blobdiff - prompt_test.go
Manage source routes with root tools
[onechat] / prompt_test.go
index 0aa9adbd205e5213c46c81e2d54e048b5b5a7b79..c9cadc2167022026836b29e6259992114c22afab 100644 (file)
@@ -128,7 +128,7 @@ func TestProbePromptKeepsTheInstructionsPathStable(t *testing.T) {
 
 func TestAgentToolsAreStrictAndStable(t *testing.T) {
        tools := promptTools()
 
 func TestAgentToolsAreStrictAndStable(t *testing.T) {
        tools := promptTools()
-       require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit", "spawn", "agent_create", "tell", "whatsapp_find", "whatsapp_send", "schedule_set", "schedule_list", "schedule_remove"}, promptToolNames(tools))
+       require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit", "spawn", "agent_create", "tell", "whatsapp_find", "whatsapp_send", "route", "unroute", "routes", "schedule_set", "schedule_list", "schedule_remove"}, promptToolNames(tools))
        require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit"}, promptToolNames(promptSubagentTools()))
 
        for _, tool := range tools {
        require.Equal(t, []string{"zoom", "date", "shell", "read", "write", "edit"}, promptToolNames(promptSubagentTools()))
 
        for _, tool := range tools {
@@ -156,6 +156,7 @@ func TestRootPromptDefinesChildRoutingAndConsent(t *testing.T) {
        require.Contains(t, text, `Use tell for children and subagents, and zoom("Name") for their memory.`)
        require.Contains(t, text, "Pass area messages from mixed chats to the right child with sender, date, and\nwords.")
        require.Contains(t, text, "Never send a WhatsApp reply drafted by a child without the user's\nagreement.")
        require.Contains(t, text, `Use tell for children and subagents, and zoom("Name") for their memory.`)
        require.Contains(t, text, "Pass area messages from mixed chats to the right child with sender, date, and\nwords.")
        require.Contains(t, text, "Never send a WhatsApp reply drafted by a child without the user's\nagreement.")
+       require.Contains(t, text, "Set or remove a route only after the user agrees.")
        require.Contains(t, text, "You act again when a message or your own schedule wakes you.")
        require.True(t, strings.HasSuffix(text, "Keep replies short."))
 
        require.Contains(t, text, "You act again when a message or your own schedule wakes you.")
        require.True(t, strings.HasSuffix(text, "Keep replies short."))