Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix: remove no human notice

Gus6e370699ef68
diff --git a/src/cli/daemon/prompt.test.ts b/src/cli/daemon/prompt.test.ts
index b78bdbcf8..bff76435d 100644
--- a/src/cli/daemon/prompt.test.ts
+++ b/src/cli/daemon/prompt.test.ts
@@ -95,9 +95,9 @@ describe("buildPrompt", () => {
it("adds EMAIL_NOTICE for email_notification tasks without context", () => {
const task = makeTask("New email from [email protected]: Hi", "email_notification");
const parsed = JSON.parse(buildPrompt(task));
- expect(parsed.notice).toContain("no human in this session");
+ expect(parsed.notice).toContain("triggered by an incoming email");
expect(parsed.notice).toContain("email sending tool");
- expect(parsed.notice).toContain("send them an email asking for it and then exit");
+ expect(parsed.notice).toContain("email them and then exit");
expect(parsed.notice).toContain("new task will be triggered automatically");
});
@@ -107,7 +107,7 @@ describe("buildPrompt", () => {
context: { conversationType: "email_notification" },
};
const parsed = JSON.parse(buildPrompt(task));
- expect(parsed.notice).toContain("no human in this session");
+ expect(parsed.notice).toContain("Reply to the sender via email");
});
it("adds DM_NOTICE when conversationType is user_dm_message with dmUser", () => {
@@ -119,7 +119,7 @@ describe("buildPrompt", () => {
expect(parsed.notice).toContain("Alice");
expect(parsed.notice).toContain("[email protected]");
expect(parsed.notice).toContain("reply to them directly");
- expect(parsed.notice).not.toContain("no human in this session");
+ expect(parsed.notice).not.toContain("Reply to the sender via email");
});
it("falls back to EMAIL_NOTICE when conversationType is user_dm_message but dmUser is missing", () => {
@@ -128,7 +128,7 @@ describe("buildPrompt", () => {
context: { conversationType: "user_dm_message" },
};
const parsed = JSON.parse(buildPrompt(task));
- expect(parsed.notice).toContain("no human in this session");
+ expect(parsed.notice).toContain("Reply to the sender via email");
});
it("falls back to EMAIL_NOTICE when conversationType is undefined in context", () => {
@@ -137,7 +137,7 @@ describe("buildPrompt", () => {
context: { someOtherField: "value" },
};
const parsed = JSON.parse(buildPrompt(task));
- expect(parsed.notice).toContain("no human in this session");
+ expect(parsed.notice).toContain("Reply to the sender via email");
});
it("adds DM_RESPONSE_NOTICE for user_dm_message tasks", () => {
@@ -152,7 +152,7 @@ describe("buildPrompt", () => {
const task = makeTask("Do the standup", "calendar_event");
const parsed = JSON.parse(buildPrompt(task));
expect(parsed.notice).toContain("scheduled calendar event");
- expect(parsed.notice).toContain("no human in this session");
+ expect(parsed.notice).toContain("send an email");
expect(parsed.notice).toContain("email sending tool");
expect(parsed.description).toBeUndefined();
expect(parsed.scheduled_by).toBeUndefined();
diff --git a/src/cli/daemon/prompt.ts b/src/cli/daemon/prompt.ts
index 718e79f5b..7a96ed262 100644
--- a/src/cli/daemon/prompt.ts
+++ b/src/cli/daemon/prompt.ts
@@ -7,16 +7,15 @@ const DM_RESPONSE_NOTICE =
" If this task will take more than 30 seconds, send a quick ack first so the user knows you're on it.";
const EMAIL_NOTICE =
- "This task was triggered automatically by an incoming email. There is no human in this session." +
- " If you need to communicate with a human, you MUST send an email using the email sending tool." +
- " If you need more information or confirmation from the human, send them an email asking for it and then exit." +
- " Do not wait — when the human replies, a new task will be triggered automatically and you will be woken up with their response.";
+ "This task was triggered by an incoming email. Reply to the sender via email — use the email sending tool to respond." +
+ " If you need more information or confirmation, email them and then exit." +
+ " Do not wait — when they reply, a new task will be triggered automatically and you will be woken up with their response.";
const CALENDAR_NOTICE =
- "This task was triggered by a scheduled calendar event. There is no human in this session." +
- " If you need to communicate with a human, you MUST send an email using the email sending tool." +
- " If you need more information or confirmation, send an email asking for it and then exit." +
- " Do not wait — when the human replies, a new task will be triggered automatically and you will be woken up with their response.";
+ "This task was triggered by a scheduled calendar event." +
+ " If you need to communicate with someone, send an email using the email sending tool." +
+ " If you need more information or confirmation, email them and then exit." +
+ " Do not wait — when they reply, a new task will be triggered automatically and you will be woken up with their response.";
const ISSUE_NOTICE =
"This task was triggered by an assigned issue. The issue_id is provided in this message." +